Do you want to be able to shut down your usb puppy quickly? Without waiting for the final savefile update which can often take several minutes if you have a slow usb stick or lots of data waiting to be updated?

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

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:

(Thanks 01micko for the "if" code - I couldn't have done it without that...)

b) Write a script containing the following code and put it into /usr/bin

Code:

#!/bin/sh
echo "test" > /tmp/No_save
/usr/bin/wmpoweroff

(This script will create a temporary "flag file" which will tell the shutdown procedure NOT to save. We will call this script from a new desktop icon. I called my script "No_save" but any name without spaces is fine)

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!
.

nosave48.png

Description

Free, high quality icon

Filesize

4.3 KB

Viewed

3857 Time(s)

save no_save desktop_.png

Description

Save or don't save - your choice

Filesize

16.4 KB

Viewed

3826 Time(s)

Last edited by greengeek on Mon 14 Oct 2013, 01:07; edited 1 time in total

I think your first post just answered my question, this Nosave flag is what I need I think
http://murga-linux.com/puppy/viewtopic.php?p=670536#670536

EDIT: Nope, please ignore I see you modified rc.shutdown for that flag file my bad for skimming through thread_________________puppy.b0x.me stuff mirrored HERE or HERELast edited by dejan555 on Tue 11 Dec 2012, 14:13; edited 1 time in total

e.g. I often want to make no session saves during the session...
Then reboot into a new session without saving during the reboot.

This would typically be a banking or buying session...
Or opening multiple unusual web-pages that I don't want to save...
Then reboot into a normal session->[open at the Puppy Forums plus the PC-Guide Forums]...
During and after which I would probably again save no changes, but then again I might.Last edited by Sylvander on Tue 11 Dec 2012, 14:15; edited 2 times in total

With my present arrangement...
I can choose to either shutdown or reboot...
And THEN I'm asked whether "to save or not to save"...
"Don't save" is the default, and that's my usual choice [I just hit "Enter" to "OK" that].

Is there any way with the above method to choose the one or the other?
i.e.
REBOOT and don't save...
Or...
SHUTDOWN and don't save.

I imagine the user should make 2 shortcuts:
1 with its script using wmreboot...
The other with its script using wmpoweroff.

Yes, there are ways to do it with one script and simple dialog box where you would have just shutdown and reboot buttons and wouldn't save session, or you could just write script to write the No_save file and then shutdown or reboot from normal menu, wmpoweroff/wmreboot is really not needed in script but then you need to click the script to make file and then regularly use menu's shutdown/reboot_________________puppy.b0x.me stuff mirrored HERE or HERE

Hi dejan, when I first started looking at how to alter savefile behaviour during shutdown I realised that there are other files in the loop aswell - one of which looks at whether or not the savefile already exists (and if not it asks to create one). Maybe there will be some reminder for you in this post:
http://murga-linux.com/puppy/viewtopic.php?t=78228&start=36
Maybe it was one of those other files you originally modified?

Maybe a search for "snapmergepuppy" in the rc.shutdown file will help you spot which part of the dialog looks for a savefile? I will try to find something later tonight.

I'm looking at /usr/sbin/shutownconfig now it seems Barry moved some code from rc.shutdown there, the puppy version I remastered for my desk before is older so the scripts changed a lot I guess. Haven't done much scripting or modifyng for a while so I need some time to catch on things _________________puppy.b0x.me stuff mirrored HERE or HERE

A. My present arrangement:
1. My pupsave on a partition on an internal HDD is treated as though it's a pupsave on a Flash Drive.
To do this I edit one of the settings in a file in the Puppy ISO.
Then...
2. I set the save interval to zero [0], so that there is no auto-save during the session.
3. If I want to save during the session, I click the "Save" icon on the desktop.
SO...
I think what you need is...

B. Three icons:
1. An icon to set the save interval to zero on 1st click...
Click once more and the save interval goes back to the default 30 min.
Does your "Temporarily suspend savefile updates" do [something like] this?

C. Oops, RSH got in with that post whilst I was typing my own response.
I don't have Lazy Puppy in my stack of 7 Puppy Cd's.
I believe I tried your version 2.0.2 [17th June 2012][still have that ISO] and found it wouldn't boot on my 2012 64-bit desktop PC
[Asrock H61M-S mobo].

1. An icon to set the save interval to zero on 1st click...
Click once more and the save interval goes back to the default 30 min.
Does your "Temporarily suspend savefile updates" do [something like] this?

I don't have such an icon yet - I was wondering if that was the function you wanted. I think that's a nice idea to have an icon to switch between savetime of 0 and 30. (ie: this icon could be called "switch between auto save & manually controlled save"). Maybe the icon could just bring up a dialog? (although I prefer to use just a single click...)

Maybe we need RSH version of shutdown menu all the time on the desktop.

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum