rc.local doesn't keep changes!

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

rc.local doesn't keep changes!

#1 Post by sunburnt »

I added a few lines to the rc.local file to run another script not on the image.gz file.

if [ -f "/mnt/home/add-local" ]; then
. /mnt/home/add-local
fi

If made part of all Puppies, additions could be made to the bootup without having to make a new image.gz file every time.

I made a new image.gz & then gunzipped it & checked it's contense, all was good.
Bootup didn't run the "off - image.gz" file: add-local.
Checking the /etc/rc.d/rc.local file showed that the added lines weren't there!
I'm really confused how the rc.local file got changed back to it's original state.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

/etc/rc.d/rc.local0 is used for user-entries.
You won't even have to build a new image.gz.
Mark

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#3 Post by Pizzasgood »

Actually, it depends (I think).
You should edit rc.local for an individual installation.
If you remaster the image.gz, you need to do the editing to rc.local0.

rc.local is definately persistant when you simply edit it, but from your post it looks like it isn't when you remaster it. In Puppy, if there is a file with a 0 at the end of it, that is what you edit before remastering. Like root0.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

kethd
Posts: 451
Joined: Thu 20 Oct 2005, 12:54
Location: Boston MA USA

#4 Post by kethd »

I like what you are trying to do -- I have been thinking/working along the same lines -- let us know what you figure out!

But I am confused about the specific construct -- are you sure it is legal? I thought I read that way of "including" scripts was limited to the current sub-directory, or something screwy like that? So, I thought maybe a script would have to be copied before it could be include-processed, which would maybe be impossible if you were currently within a read-only filesystem...

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#5 Post by sunburnt »

I think Pizzasgood is right;
rc.local is edited directly, NOT in the image.gz file
rc.local0 is edited in the image.gz file (I think, I'll check to be sure)

Directly editing rc.local0 DID NOT keep the changes at boot.

So... rc.local seems to come from the pup001 file, & rc.local0 seems to come from the image.gz file.

kethd; the file in: /mnt/home ran just as my code is, just use a full path to it (of course).

Thanks guys, I've been struggling with this.

Post Reply