Page 1 of 1

2.0.2 Upgrade - handling of modded scripts? (Solved)

Posted: Sun 30 Jul 2006, 14:12
by PaulBx1
I was looking at Barry's note on how 2.0.2 handles modded scripts:

I still don't get it. Perhaps someone can elaborate?

I'm very example-oriented, so let's take a particular file, rc.local. We have the original rc.local in 2.0.1, which has been made invisible by unionfs as my own rc.local in pup-save.3fs is newer. Now I upgrade to 2.0.2. Does the rc.local in that version have an earlier or later date than my modified one?

I'm guessing from Barry's comments that it will have a later date (since an earlier date would cause no problem) - maybe it's the date the CD is burned, or the 2.0.2 build date, who knows - therefore his script /initrd/sbin/init must notice this and move the 2.0.2 version over to /tmp, thus telling unionfs that the version in pup_save.3fs is now the latest one in /etc/rc.d.

OK, I guess that much is clear (assuming I got that right :roll: ) but now what happens if rc.local from 2.0.2 has a change in it that actually needs to be there? Does that cause the init script to merge the 2.0.2 version with mine? I can't imagine how to do that reliably in any automated way.

Also I'm wondering how to upgrade. I am currently booting off a 2.0.1 CD with the pup_save on the hard drive. Do I just slap the 2.0.2 CD in there and boot?

Re: 2.0.2 Upgrade - handling of modded scripts?

Posted: Sun 30 Jul 2006, 16:08
by Lobster
PaulBx1 wrote: Also I'm wondering how to upgrade. I am currently booting off a 2.0.1 CD with the pup_save on the hard drive. Do I just slap the 2.0.2 CD in there and boot?
Just slap it in :)
Upgrade s simple and trouble free

Posted: Mon 31 Jul 2006, 00:48
by BarryK
That's right, just do it! Anything that's removed goes into /tmp/versioncleanup/, so have a peak in there after upgrading.

Regarding the example of rc.local ...well, that's not a good example as the live-cd
doesn't have a rc.local so your custom version will never get overwritten.

So, take rc.local0 as the example. The file with the latest modify date is what whould remain in place after an upgrade. If the live-cd has the same rc.local0 as used in 2.01 and you modified it since then, then your version takes precendence.
At least that's the theory of it.

Posted: Mon 31 Jul 2006, 14:46
by PaulBx1
OK, but I was wondering what if both I modified it, and you modified it.

Well, I found out. I had to add a kludge to /etc/modprobe.conf a while back to get my wireless running, and you also changed modprobe.conf in going from 2.0.1 to 2.0.2. The one in /etc was the one from your upgrade, not my change, so I took my kludge stored in the file in the tmp directory and added it to your upgraded one, and all was fine. I looked through the rest, did diffs, etc to check, and they all looked innocent.

Actually I copied the tmp directory under /root so I have it around a while, if I need to look at that old stuff. A security blanket. :)