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 30 Sep 2014, 02:00
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Question about some scripts | remastering 5.4.1
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
dejan555


Joined: 30 Nov 2008
Posts: 2662
Location: Montenegro

PostPosted: Tue 11 Dec 2012, 13:55    Post subject:  Question about some scripts | remastering 5.4.1  

Hey people, sup?

So, I'm remastering puppy precise 541 for use on my laptop.
I'm doing it manually (unsquash sfs / make changes / resquash).
I want to boot remastered version without savefile and I'd like to remove the first shutdown dialog that asks me about saving session.

IIRC when I was remastering dpup for my desk PC it was some part in /etc/rc.d/rc.shutdown that handled this but now I can't find it for the life of me in precise... I did remove one block about saving but I think it was code that executes after you answer the dialog and can't find where is the dialog itself... any help?

For first run wizard was easy there are some flag files that I just created in /tmp and/or /var and now delayedrun script don't offer dialog anymore, want to do same with shutdowndialog so it just powers off without questions.

_________________


Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
dejan555


Joined: 30 Nov 2008
Posts: 2662
Location: Montenegro

PostPosted: Tue 11 Dec 2012, 14:02    Post subject:  

I think I just found answer in another thread

EDIT: No, no I didn't I see he uses modified rc.shutdown and it's code for saving to usb which I removed anyway

EDIT2: Found what I needed, aparenty first session save dialog and other saving functions are now in /usr/sbin/shutdownconfig which is called from rc.shutdown, removed code that call the script and some other blocks of code for saving so it now just straight shuts down.

Another question: how can I strip size and remove uneeded hardware modules? I saved whole /etc dir so now my gfx, net and other settings are loaded on boot so, how can I determine which are all modules used and where is directory that has other non-used "drivers" "firmware" or whatever they're called so I can delete them?

_________________


Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
xophist


Joined: 10 Dec 2012
Posts: 26
Location: Coastal Texas

PostPosted: Tue 11 Dec 2012, 19:06    Post subject:  

> I'd like to remove the first shutdown dialog that asks me about
> saving session.

I want to do this too, as I like to avoid pupsave and save what I want manually.


> apparently first session save dialog and other saving functions
> are now in /usr/sbin/shutdownconfig which is called from
> rc.shutdown, removed code that call the script and some other
> blocks of code for saving so it now just straight shuts down.

Immediately after booting up, I mount a drive and run my setup script. I will try adding this to the setup script:

touch /etc/personal_data_save_disabled

I have not tested this, but the existence of this file should have the results we want, according to /usr/sbin/shutdownconfig:

if [ -f /etc/personal_data_save_disabled ];then #120823 rerwin
SAVECHOICE=256 #120823 rerwin: do not save - case *) below
else #120823

It might be days before I reboot, so please let me know if you get a chance to test this. It would require you to use the default shutdownconfig, rather than your hacked version.
Back to top
View user's profile Send private message 
dejan555


Joined: 30 Nov 2008
Posts: 2662
Location: Montenegro

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

Thanks, but I already resquashed sfs I still have the previous version though so I could test this, would be usefull to know both ways of making this work.

As far as I see shutdownconfig is all about saving session so calling it from rc.shutdown is not needed at all but adding just one blank file would be much easier for remastering and not risking of messing up script by removing code.

_________________


Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
xophist


Joined: 10 Dec 2012
Posts: 26
Location: Coastal Texas

PostPosted: Fri 01 Feb 2013, 02:53    Post subject:  

If it's true that shutdownconfig is only about saving session data, what follows is the wrong approach. As you said, just don't call shutdownconfig.

But if there is any other cleanup in shutdowconfig, then this could be useful and have fewest side effects:


Tested, and this works the way I like it (immediate shutdown):

1. You need to create the file:

touch /etc/personal_data_save_disabled

2. Then edit /usr/sbin/shutdownconfig. You need to copy the check for the file from case iso9660 to case ext2|ext3 as shown below.


edit /usr/sbin/shutdownconfig

BEFORE
======

case $xDEVFS in
ext2|ext3|ext4|reiserfs|minix|btrfs)

<content for this case here>

;;
iso9660)
if [ -f /etc/personal_data_save_disabled ];then #120823 rerwin
SAVECHOICE=256 #120823 rerwin: do not save - case *) below
else #120823
...



Just copy the check from case iso9660 into case ext2|ext3...)
and don't forget the fi at the end:

AFTER
=====

case $xDEVFS in
ext2|ext3|ext4|reiserfs|minix|btrfs)
if [ -f /etc/personal_data_save_disabled ];then #120823 rerwin
SAVECHOICE=256 #120823 rerwin: do not save - case *) below
else #120823
<content for this case here>
fi # <== don't forget this fi
;;
iso9660)
if [ -f /etc/personal_data_save_disabled ];then #120823 rerwin
SAVECHOICE=256 #120823 rerwin: do not save - case *) below
else #120823
...
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
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.0510s ][ Queries: 12 (0.0035s) ][ GZIP on ]