Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 30 Mar 2015, 13:56
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Shutdown without updating savefile. Alternative method
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 3 [31 Posts]   Goto page: Previous 1, 2, 3 Next
Author Message
greengeek

Joined: 20 Jul 2010
Posts: 2954
Location: New Zealand

PostPosted: Tue 11 Dec 2012, 20:28    Post subject:  

Barkin wrote:
IMO the "save" and "nosave" icons are too similar and could be mistaken for each another.

True. I've now stolen your icon for future use and also modified the save one. Thanks!
Smile
save grn.jpg
 Description   
 Filesize   31.84 KB
 Viewed   673 Time(s)

save grn.jpg

Back to top
View user's profile Send private message 
dcc701

Joined: 23 Apr 2014
Posts: 44
Location: Seattle, US

PostPosted: Fri 27 Mar 2015, 01:59    Post subject:  

green geek's rc.shutdown code modification (above, first page) seems very useful to me, but I feel like it needs update before I could use it in tahrpup. The code at "13)" is quite a bit diff in tahrpup and I'm afraid of making an error.
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2954
Location: New Zealand

PostPosted: Fri 27 Mar 2015, 02:57    Post subject:  

Hi dcc - I haven't used Tahrpup yet so unfortunately I can't recommend a solution. However, I thought that Tahr had a new type of setup for selecting save or no save at shutdown, quite different to other puppies - it may be worth asking a question about this in the Tahr thread.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 9966

PostPosted: Fri 27 Mar 2015, 06:39    Post subject:  

nohup busybox shutdown

that makes it kick the bucket Very Happy

mike
Back to top
View user's profile Send private message 
dcc701

Joined: 23 Apr 2014
Posts: 44
Location: Seattle, US

PostPosted: Fri 27 Mar 2015, 12:27    Post subject:  

Hi greengeek--Thanks for reply. I actually did recently post a newbie question on the issue of customizing defaults on that tahrpup save/notsave shutdown routine. That is working, but I'm thinking for my use it'd also be nice to just have a "forget" button on the desktop, right near the "save" button!

mikeb--That looks like some serious code there! Would it fry my computer?
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 9966

PostPosted: Fri 27 Mar 2015, 14:54    Post subject:  

Quote:
mikeb--That looks like some serious code there! Would it fry my computer?

well a terminal one liner ... just goes straight to busybox shutdown... its not really any worse than the normal shutdown routine in terms of drive unmounting.

the nohup makes sure it carries on regardless to the bitter end Smile Also handy if you ever remote control a pup.

mike
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 9966

PostPosted: Fri 27 Mar 2015, 14:55    Post subject:  

forum notification glitch..seem to happen a lot at the moment.

mike
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2954
Location: New Zealand

PostPosted: Fri 27 Mar 2015, 15:19    Post subject:  

mikeb wrote:
nohup busybox shutdown
This will bypass the normal 'soft shutdown' features though won't it? What about sfs, drive and filesystem unmounts? By still using the rc.shutdown method I was trying to retain those functions for safety - just avoiding the save process itself.

EDIT : I do use a different method on some of my systems - I made an icon and script I call "Quickdown". Don't know if it would be applicable to other Tahrpups but here is the code:

Code:
#!/bin/bash
#2014May16  greengeek code to unmount drives then perform busybox shutdown. Intended for
#use with BanksyPup live puppy environment where quick shutdown without save is required.


####Musher0 code to unmount only disks
df -H -T -x squashfs -x tmpfs -x rootfs -x aufs -P | grep "/mnt/s" | cut -f2 -d'm' > spc_dsq.txt
while read line
do
umount /m$line
done < spc_dsq.txt
rm -f spc_dsq.txt
sleep 3

exec /bin/busybox poweroff
quickdown48.png
 Description   
 Filesize   4.87 KB
 Viewed   130 Time(s)

quickdown48.png

desktop_shutdown_options.jpg
 Description   
 Filesize   7.39 KB
 Viewed   130 Time(s)

desktop_shutdown_options.jpg

Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 9966

PostPosted: Fri 27 Mar 2015, 15:28    Post subject:  

Its not that soft... busybox unmounts what it can and the union will not either way.

The only true way of shutting down cleanly in puppy is to be entirely in ram.
I did hear of someone who painstakingly was able to unmount pup_rw/save file but it all seemed a bit hit an miss.

mike
Back to top
View user's profile Send private message 
dcc701

Joined: 23 Apr 2014
Posts: 44
Location: Seattle, US

PostPosted: Fri 27 Mar 2015, 19:10    Post subject:  

Hi greengeek--
Thanks. Is your "Quickdown" script in /usr/bin? Does anyone know if this would be OK for tahrpup or not?
Nice set of icons.
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2954
Location: New Zealand

PostPosted: Sat 28 Mar 2015, 02:39    Post subject:  

dcc701 wrote:
Is your "Quickdown" script in /usr/bin?
Yes, I place it in /usr/bin.
Quote:
Does anyone know if this would be OK for tahrpup or not?
I think it should be fine in Tahrpup - especially if you replaced the last line (invoking busybox) with mikeb's version (using nohup with busybox)

It would be worth trying by booting Tahr in "live session" with your savefile/savefolder hidden temporarily. If it works this way then I would expect it to work with savefile/savefolder too.
Back to top
View user's profile Send private message 
dcc701

Joined: 23 Apr 2014
Posts: 44
Location: Seattle, US

PostPosted: Yesterday, at 02:50    Post subject:  

greengeek--
Works! Thanks!
However I tried changing your last line
exec /bin/busybox poweroff
to
exec /bin/nohup busybox poweroff
and it didn't work.
I took out "nohup" and it works.
Also tried
exec /bin/nohup busybox shutdown
and it didn't work.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 9966

PostPosted: Yesterday, at 09:54    Post subject:  

perhaps nohup gets moved around or its not in all pups.

Its not essential for scripts usually..I find its needed if running from a virtual terminal or remotely via ssh Thats mainly as puppys boot structure leaves you in a strange place in linux terms and there is no shutdown binary..nohup gets you through that rather than ending up in an endless loop or messing up saving.

mike
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2954
Location: New Zealand

PostPosted: Yesterday, at 13:52    Post subject:  

dcc701 wrote:
However I tried changing your last line
exec /bin/busybox poweroff
to
exec /bin/nohup busybox poweroff
and it didn't work.
As mike says - there are potentially differences between pups. I use a Slacko 5.6 derivative and have just successfully tried changing the last line like this:
Code:
exec nohup busybox poweroff

Pup knows it's own paths better than I do Smile
Worth a try anyway.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 9966

PostPosted: Yesterday, at 14:14    Post subject:  

The path to puppy nirvana is a changeable one Very Happy

mike
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 3 [31 Posts]   Goto page: Previous 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

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


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0814s ][ Queries: 12 (0.0042s) ][ GZIP on ]