site  contact  subhomenews

Multisession bug fix

August 20, 2010 — BarryK
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.



Username: 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.

findutils in /var
Username: technosaurus
"My compile of findutils saves the "locatedb" file in /var when you run [i]updatedb[/i] /var/locatedb is used by [i]locate[/i] 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 ?

Re locatedb
Username: BarryK
"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.

Tags: woof