Page 4 of 4

cleanup script copy update

Posted: 02 Dec 2017, 16:55
by Ed_P
abelM PROBLEM!! :shock:

Last night after making changes to a couple of my scripts in /home/guest/ I ran the script to tweak cleanup to only save updated files. sed -i 's/cp -af /cp -afu /' /mnt/live/cleanup I checked the file and the update took. I shutdown and it updated my save.dat file. Today I rebooted and went to work on my scripts more and found that they didn't have any of the changes I made last night!!! :rant:

My save.dat file is 64% full with 300+MB available so it being full is not the problem.

cleanup script copy update

Posted: 03 Dec 2017, 01:27
by Ed_P
brokenman, you might want to hold off on the cleanup script change in 4.0 till this gets resolved.

Any chance cleanup doesn't use the local time setting the DE uses?

cleanup script copy update

Posted: 03 Dec 2017, 07:59
by apollo
Hi Ed,

did you update your initrd.xz as abelM/brokenman stated earlier in this thread?

cheers
apollo

cleanup script copy update

Posted: 03 Dec 2017, 12:33
by brokenman
I will have to investigate. I am not sure how cp -u handles updated files.

cleanup script copy update

Posted: 03 Dec 2017, 13:59
by Ed_P
apollo wrote:
03 Dec 2017, 07:59
Hi Ed,

did you update your initrd.xz as abelM/brokenman stated earlier in this thread?

cheers
apollo
No, I boot from the 3.2.2 ISO.

In reviewing the begining of this thread I see that the adding of the u was already found to not work with 3.2.2. :no: Dumb me forgot. :thumbdown: :wall:

cleanup script copy update

Posted: 03 Dec 2017, 19:44
by abelM
Hi Ed!

You're not alone. I've made the same mistake! :mega_shok: That's why I'm testing new code in dump-session bypassing cleanup save on exit

Code: Select all

# /etc/rc.d/rc.local_shutdown
dump-session && rm -f /mnt/live/tmp/changes-exit
BTW I've added a small fix to dump-session you can see at direct update at dump session (Post by abelM #60792)

Regards

cleanup script copy update

Posted: 03 Dec 2017, 19:48
by apollo
@brokenman
regarding to the cp manpage, -u updates files which are "newer" in the source or are completely missing at the destination...should be the way we want it to work :)

cleanup script copy update

Posted: 04 Dec 2017, 16:43
by abelM
That's OK! Another interesting point is saving from union system to persistence without using a temporary folder. The proposed dump-session achieves both goals and cleanup could eventually too. ;)

Regards

cleanup script copy update

Posted: 13 Dec 2017, 15:44
by abelM
Hi all!

There's a small fix at direct update at dump session (Post by abelM #61071)

Regards,

cleanup script copy update

Posted: 19 Dec 2017, 19:12
by Jack
I use a USB and it is ext4 format and I save my data in the changes directory on the USB. It works great on the first boot up but on the 2nd boot up it boots in to a black screen. It likes when I power down after the first boot up something gets delete in the changes directory on the USB. I must be the only one using this setup.

I thought it was my Mate build but I try Openbox and LXDE but they did it too (black screen).

I like to stay current but if it don't get fixed I won't be able too.