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 Tue 17 Jul 2018, 06:01
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 3 of 3 [34 Posts]   Goto page: Previous 1, 2, 3
Author Message
dcc701

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

PostPosted: Sun 29 Mar 2015, 16:40    Post subject:  

How true, mikeb!
Just a caution to anyone else who does the above:
This worked, but it somehow disabled rc.shutdown's asktosave function, which ceased working as soon as I created the above script.
So it might be an either/or proposition in tahrpup: either you can have a "not save" script with icon on the desktop, or you can use built-in asktosave, but not both!
I'm just kind of weighing which I prefer.
Thanks everyone!
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5091
Location: Republic of Novo Zelande

PostPosted: Mon 30 Mar 2015, 14:13    Post subject:  

dcc701 wrote:
This worked, but it somehow disabled rc.shutdown's asktosave function,
Yes, the quickdown script does not use rc.shutdown at all - it just uses busybox to drive the shutdown (with Musher0's additional steps to handle drive unmounting). It is just a method for a user who has already made the decision that they do not want to save (and therefore does not want a further 'ask-to-save' question)

The other method listed on page 1 involves changes to rc.shutdown but as you pointed out the shutdown functionality has all been changed in tahrpup so the method would have to be modified to accommodate the new style of rc.shutdown. Unfortunately I don't feel competent to make such changes as I have so far avoided the recent "save to file" and "asktosave" developments in favour of not running a savefile at all. (I currently use a personalised sfs instead - which does not retain daily 'saved' changes at all)

I may eventually get up to speed with the modern pups and the new shutdown methods but probably later rather than sooner.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11130

PostPosted: Mon 30 Mar 2015, 15:13    Post subject:  

Yes its all a bit obsolete to me too...been using a save sfs for years ..though that DOES save changes. I have had save folder too but never use it with puppy for other reasons plus its my scripts so different anyway.

Such fast shutdown only come into play if I manage to make the system go crosseyed experimenting Very Happy

I suppose choosing the fast shutdown would effectively be the choice and not saving is part of that...

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

Joined: 28 Oct 2008
Posts: 1527
Location: Brisbane, Australia

PostPosted: Mon 27 Apr 2015, 07:50    Post subject: rc.shutdown mod for tahrpup 6.0.2  

If you want to implement the original concept in Tahrpup 6.0.2, try the following:
In rc.shutdown replace
Code:
if [ "$ASKTOSAVE" = "false" ]; then
  RETVAL=0
else
with
Code:
if [ "$ASKTOSAVE" = "false" ]; then
  #If "No_save" flag file exists set RETVAL so save is avoided
  if [ -f "/tmp/No_save" ]; then
   RETVAL=1
  else
   RETVAL=0
  fi
else
Later code only does a save if this 'asktosave_func' returns 0

Note: Use at your own risk. It's not tested since I usually run in PUPMODE=12, and this code does not apply.

gyro
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 3 [34 Posts]   Goto page: Previous 1, 2, 3
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.0688s ][ Queries: 12 (0.0383s) ][ GZIP on ]