Puppy usb installs are usually set with the default setting to save all data to the savefile periodically, and that can be a useful function so that you capture whatever work you have been saving into Puppy's internal file structure. However, I don't always want to allow the final pupsave that occurs during the powerdown sequence. Sometimes I just want to shutdown quickly with a single click. no questions asked.
This might be because I am in a hurry and don't care about any new data I've just been viewing/downloading, or it might be that I am choosing to discard changes that I have just made (eg: I might have accidentally removed a critical folder and I don't want that deletion to become permanent)
I want to highlight two methods that can be used to achieve this:
1) There is a superquick way to shut down your usb puppy.
***WARNING*** This method is potentially dangerous, and there may be significant risk to your data.***WARNING***
If you want to take this risk (and sometimes I do...) the topic is here:
http://www.murga-linux.com/puppy/viewtopic.php?t=67084
(also another similar discussion here: )
http://www.murga-linux.com/puppy/viewtopic.php?t=89282
2) I also have another method which does NOT bypass the normal "soft" shudown procedures, it just bypasses the final pupsave procedure. You don't have to go through the normal shutdown menu, you just click a desktop icon which forces an immediate shutdown without save, but with all the normal unmounts etc. It can save you several minutes of valuable time.
Here is how to do it:
a) First we need to modify the shutdown file so that it is ready to wait for our "no_save" command:
Locate file /etc/rc.d/rc.shutdown and open it as text.
Search for "13)" and/or "snapmergepuppy" and find the paragraph that looks like the code snippet below:
Add in 3 extra lines as shown embedded here:
Code: Select all
13) #PDEV1 and PUPSFS and PUPSAVE
#/initrd/pup_rw has tmpfs, pup_ro1 has ${DISTRO_FILE_PREFIX}save.2fs file (PUPSAVE), pup_ro2 has PUPSFS file.
#the above are in unionfs at /.
#Start "if" test for "No_save" flag file and save only "if" file "/tmp/No_save" does actually exist
if [ ! -f "/tmp/No_save" ];then
echo "`eval_gettext \"Saving session to \\\${SAVEFILE} (\\\${SAVEPART})...\"`" >/dev/console
#echo "Saving session to $SAVEFILE (${SAVEPART})..." >/dev/console
/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
fi #end "if" test.
;;
b) Write a script containing the following code and put it into /usr/bin
Code: Select all
#!/bin/sh
echo "test" > /tmp/No_save
/usr/bin/wmpoweroff
c) Drag this script onto the desktop (creates a symlink). Right click it and add an icon if you wish. (I have attached a super high quality one if you are desperate)
*******IMPORTANT NOTE*******
You must now force (or wait for...) a "save to savefile" to occur, otherwise these changes will not be retained.
In other words - don't trial the new icon until after everything is saved into your savefile, or else all you will do is shutdown without saving the changes!
.