Multisession bug fix

This is something that I have been meaning to fix for awhile.

Running Puppy as multisession CD/DVD, nothing in /var gets saved. There is however a need to save some items in /var. I have been using /var/local for saving information that is supposed to be persistent between boots, so I have added saving of /var/local in multisession Puppy.

/var is still not saved, but the multisavefunc() function in /etc/rc.d/functions4puppy, called from /etc/rc.d/rc.shutdown and /usr/sbin/savesession-dvd, copies /var/local to /root/.var_saved/local, which does get saved.

At bootup, the 'init' script now detects the existence of /root/.var_saved and restores /var.

If anyone can think of anything else in /var that should be saved, let me know and I can add it.

Posted on 20 Aug 2010, 17:11


Posted on 20 Aug 2010, 19:05 by aarf
/var/tmp is not deleted between reboots with pupsave. so it gets clogged up with opera crash logs.

Posted on 20 Aug 2010, 22:52 by BarryK
Ok, done. /etc/rc.d/rc.shutdown deletes the contents of /var/tmp, and /usr/sbin/snapmergepuppy (script that saves session to Flash) now screens out /var/tmp.

Posted on 20 Aug 2010, 24:43 by technosaurus
findutils in /var
My compile of findutils saves the "locatedb" file in /var when you run updatedb
/var/locatedb is used by locate to find files if the full path is not given (for example: images in gtkdialog scripts)
Should I just recompile it to save the locatedb to /etc ?

Posted on 21 Aug 2010, 8:59 by BarryK
Re locatedb
Well, the problem will only affect multisession Puppy. I guess, after a reboot, /var/locatedb would be missing, so it would get re-generated automatically?

Could 'locatedb' get big? With multisession, trying to save space wherever possible, as everything gets loaded into RAM.