| Author |
Message |
greengeek
Joined: 20 Jul 2010 Posts: 1184 Location: New Zealand
|
Posted: Sun 25 Nov 2012, 04:53 Post subject:
|
|
| musher0 wrote: | | I believe those files do some preliminary "closing" of Puppy stuff and then relay to the /etc/rc.shutdown script. |
Thanks Musher0, looks like wmpoweroff is the one I need. It seems to be located at /usr/bin/wmpoweroff. Looks like it writes to /tmp/wmexitmode.txt then links to /usr/sbin/shutdownconfig, which writes to /tmp/shutdown_results which is read after control passes back to /usr/bin/xwin which calls /sbin/poweroff which calls /etc/rc.d/rc.shutdown. Darn it - It looks circular and complex. Maybe I shouldn't fiddle with it.
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7017 Location: qld
|
Posted: Sun 25 Nov 2012, 05:20 Post subject:
|
|
greengeek
What exactly do you want to do? It might be acheivable with a service script which are called with the "stop" parameter from /etc/rc.d/rc.shutdown. A lot easier than fiddling ..
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3012 Location: Oregon
|
Posted: Sun 25 Nov 2012, 06:40 Post subject:
|
|
| Jasper wrote: |
I always make a visual comparison when checking MD5 sums, but, in case it may be of some general interest, perhaps there is an automated method?
|
Jasper, open a terminal in the directory that has the ISO.
Then type md5sum -c [name of the md5 checksum file]
You will be prompted if the files check OK.
|
|
Back to top
|
|
 |
greengeek
Joined: 20 Jul 2010 Posts: 1184 Location: New Zealand
|
Posted: Sun 25 Nov 2012, 15:28 Post subject:
|
|
| 01micko wrote: | | What exactly do you want to do? It might be acheivable with a service script which are called with the "stop" parameter from /etc/rc.d/rc.shutdown. A lot easier than fiddling .. | I use ThinSlacko in a "dualboot from usb" environment on the Win XP netbook that I use for work, and I'm experimenting with ways of speeding up my day by avoiding having to wait for slow shutdowns caused by slow savefile writes to usb. I think I have found one good solution here:
http://www.murga-linux.com/puppy/viewtopic.php?t=67084
but I realised I needed to be careful not to jeopardise mounted filesystems (especially my NTFS XP stuff) so I was experimenting with ways of doing a normal "proper" shutdown but without letting snapmergepuppy do it's thing. I read the posts about commenting out the snapmergepuppy lines in rc.shutdown but that became an "all or nothing" solution which took away the "automatic save at shutdown" feature completely.
I wanted to allow shutdown saves 90% of the time, but have a desktop icon for "dump_everything_and_shutdown_superquick" for the other 10% of the time.
(I have also trialled the code that inserts a gtkdialog into the shutdown process, and that works fine as long as I am watching the screen during the shutdown, but I was hoping to find a method that is just "click and run - no questions asked")
I toyed with the idea of having two versions of rc.shutdown - one unmodified, and one modified by removal of snapmergepuppy, but then discovered it wasn't as simple as using a desktop icon to call the modified version. The other processes that exist between calling wmpoweroff and handing control to rc.shutdown make it more complex than I first realised.
I've thought of writing a script to rename my proposed "rc.shutdownMODIFIED" to rc.shutdown, then including a routine to rename things back to how they were - but I have some research to do before I'm going to risk it.
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7017 Location: qld
|
Posted: Sun 25 Nov 2012, 16:13 Post subject:
|
|
ICK! Skipping rc.shutdown is dangerous!
Why don't you create yourself a nice little shutdown gui with a checkbox called "save session" or something, , have it checked by default, when unchecked it produces a signal and then that can create a flag in /tmp called "No_save" or whatever.
In rc.shutdown, you will see a big "case" statement with quite a few cases. Find the one "13)". Now you test for the condition of whether "/tmp/No_save" exists and if so don't run the snapmerge. Something like:
| Code: | 13)
if [ ! -f /tmp/No_save" ];then #start big if
All the snapmerge stuff happens here
fi #end big if
;;
next_case)whatever |
Something like that will work, and make sure everything gets killed and unmounted cleanly.
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
greengeek
Joined: 20 Jul 2010 Posts: 1184 Location: New Zealand
|
Posted: Sun 25 Nov 2012, 16:26 Post subject:
|
|
So if I understand you correctly, you are suggesting something like the following:
1) Modify rc.shutdown section 13 that you have shown, to test for the flag in /tmp (ie, doesnt proceed with snapmergepuppy if flag is set)
2) Write a script that is able to set the flag in /tmp, then calls wmpoweroff and lets it do the rest
3) Add a desktop icon labelled "immediate shutdown without save" or something and symlink it to the script.
Is that the general concept?
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7017 Location: qld
|
Posted: Sun 25 Nov 2012, 16:29 Post subject:
|
|
| greengeek wrote: | So if I understand you correctly, you are suggesting something like the following:
1) Modify rc.shutdown section 13 that you have shown, to test for the flag in /tmp (ie, doesnt proceed with snapmergepuppy if flag is set)
2) Write a script that is able to set the flag in /tmp, then calls wmpoweroff and lets it do the rest
3) Add a desktop icon labelled "immediate shutdown without save" or something and symlink it to the script.
Is that the general concept? |
Yeah, that ought to do it.
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
greengeek
Joined: 20 Jul 2010 Posts: 1184 Location: New Zealand
|
Posted: Mon 26 Nov 2012, 04:38 Post subject:
|
|
| 01micko wrote: | | Code: | 13)
if [ ! -f /tmp/No_save" ];then #start big if
All the snapmerge stuff happens here
fi #end big if
;;
next_case)whatever |
Something like that will work, and make sure everything gets killed and unmounted cleanly. |
OK, it's taken me a few hours but I think I've made it to first base. I've got your sample code working now, but I had to add another " (in the end I figured that maybe the leading quote marks were missing from the filename). It seems to work now (just with manual creation of /tmp/No_save) so next I will work on the script to set the flag file and call wmpoweroff.
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7017 Location: qld
|
Posted: Mon 26 Nov 2012, 06:00 Post subject:
|
|
Er.. sorry about the missing quote thing, was in a bit of a rush
Doesn't even need quoting (no spaces ). Glad it seems to be of some use to you anyway.
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
greengeek
Joined: 20 Jul 2010 Posts: 1184 Location: New Zealand
|
Posted: Mon 26 Nov 2012, 12:58 Post subject:
|
|
.
Thanks micko. I'm very happy with the outcome.
I have modified the /etc/rc.d/rc.shutdown as follows:
| Code: | 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 /.
if [ ! -f "/tmp/No_save" ];then
#start big if
#All the snapmerge stuff happens here
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 big if
;; |
then added a script "No_save" into /usr/bin as follows:
| Code: | #!/bin/sh
echo "test" > /tmp/No_save
/usr/bin/wmpoweroff |
and then dragged the script to the desktop and added an icon, so that if I want to do a safe shutdown without waiting for the final save I just click that new icon.
Many thanks for the help!
| Description |
|
| Filesize |
16.4 KB |
| Viewed |
1125 Time(s) |

|
|
|
Back to top
|
|
 |
2000kevin2000
Joined: 11 Jan 2013 Posts: 7
|
Posted: Fri 11 Jan 2013, 23:00 Post subject:
|
|
I want to put this on a computer with 96MB RAM and a 166MHZ Pentium MMX... Would this be too taxing on the hardware, should I go for a build like TurboPup or one of the 486/32MB builds instead?
|
|
Back to top
|
|
 |
Keef

Joined: 20 Dec 2007 Posts: 428 Location: Staffordshire
|
Posted: Sat 12 Jan 2013, 08:24 Post subject:
|
|
The standard Slacko was quite slow on a P450 laptop I tried it on - and verrrrrry slow to get to the desktop.
THINSlacko is stripped down, but unlikley to be significantly quicker on something as old as your kit.
|
|
Back to top
|
|
 |
Smithy

Joined: 12 Dec 2011 Posts: 189
|
Posted: Sat 09 Mar 2013, 08:33 Post subject:
|
|
Currently running this distro and everything is working well, printing,network, jack, gimp etc. A new candidate for a musicians distro I reckon!
| Description |
|

Download |
| Filename |
Amp fx2.jpg |
| Filesize |
207.58 KB |
| Downloaded |
66 Time(s) |
| Description |
|

Download |
| Filename |
Amp fx1.jpg |
| Filesize |
224.96 KB |
| Downloaded |
60 Time(s) |
| Description |
|

Download |
| Filename |
Music2go1.jpg |
| Filesize |
175.85 KB |
| Downloaded |
74 Time(s) |
|
|
Back to top
|
|
 |
greengeek
Joined: 20 Jul 2010 Posts: 1184 Location: New Zealand
|
Posted: Sat 09 Mar 2013, 14:13 Post subject:
|
|
Hey Smithy, what's the "Partition save" icon you have on the desktop in the third pic?
|
|
Back to top
|
|
 |
Smithy

Joined: 12 Dec 2011 Posts: 189
|
Posted: Sat 09 Mar 2013, 15:10 Post subject:
|
|
Hi greengeek, it is the Linux version of Partition Saving.
http://damien.guibouret.free.fr/en/index_frame.html
|
|
Back to top
|
|
 |
|