lenny@alps.UUCP (Lenny Tropiano) (09/13/89)
After the 5th brownout today, I decided to see why all the files people were editing with vi were not saved (preserved) on bootup. I know that on my 3B1/UNIX pc it works, and on my 3B2 in the office, it works there too. After some hunting, I found that /usr/lib/expreserve was not executed anywhere in the boot procedure. What then happened was that /etc/rc2.d/S05RMTMPFILES was being run, and the /tmp directory appropriately cleaned out. What needs to be done was to create a file /etc/rc2.d/S02PRESERVE [the same name on my 3B2] and place the following lines in it... --- cut here --- --- cut here --- --- cut here --- --- cut here --- # # Run an expreserve to save any files ... # if [ -x /usr/lib/expreserve ] then # Remove Rx##### files won't work without it /bin/rm -f /tmp/Rx* /usr/lib/expreserve - else echo "File /usr/lib/expreserve not found, or not executable." echo "Unable to recover lost editing sessions." fi --- cut here --- --- cut here --- --- cut here --- --- cut here --- For some reason I needed to remove the /tmp/Rx* files first (that's the file that contains named-buffer information) so the /tmp/Ex* file could be preserved and moved to /usr/preserve/[login-name]/Ex*. After successful completion of the above script on bootup, a mail message from "root" will be sent to you... |A copy of an editor buffer of your file "junkfile" |was saved when the editor was killed. |This buffer can be retrieved using the "recover" command of the editor. |An easy way to do this is to give the command "vi -r junkfile". |This works for "edit" and "ex" also. So much for lost editing sessions when the electric company decides to cut back on power... Hopefully my UPS will be coming soon! -Lenny -- Lenny Tropiano, Project Manager / Sr. Software Engineer American LP Systems, Inc. E-MAIL : ...{icus,rutgers,sbcs}!alps!lenny 305-1 Knickerbocker Avenue AT&T MAIL: ...attmail!alps!lenny Bohemia, New York 11716 PHONE : 1-516-589-7930