/sbin/rc gets overwritten when emerging baselayout. This is unacceptable because I spend a lot of time updating /sbin/rc, and Emacs only makes backups of old file, not new one. No configuration scripts should be overwritten at all. /sbin/rc has configuration assumptions, so it is a configuration script. Everything in that package that has the same behavoir as it has with /sbin/rc (not making backup) should be fixed. For instance, here are my current updates: --- /sbin/rc.~16~ 2004-02-08 13:14:30.000000000 -0800 +++ /sbin/rc 2004-02-08 13:53:10.641290394 -0800 @@ -36,9 +36,9 @@ echo /sbin/sulogin ${CONSOLE} einfo "Unmounting filesystems" - /bin/mount -a -o remount,ro & >/dev/null + /bin/sync;/bin/mount -a -o remount,ro & >/dev/null einfo "Rebooting" - /sbin/reboot -f + /bin/sync;/sbin/reboot -f fi return ${retval} @@ -60,9 +60,9 @@ echo; echo /sbin/sulogin ${CONSOLE} einfo "Unmounting filesystems" - /bin/mount -a -o remount,ro & >/dev/null + /bin/sync;/bin/mount -a -o remount,ro & >/dev/null einfo "Rebooting" - /sbin/reboot -f + /bin/sync;/sbin/reboot -f fi fi @@ -354,8 +354,9 @@ # Swap needs to be activated *after* devfs has been mounted and *after* # devfsd has been started, so that the fstab can be properly parsed # and only if the server/Gentoo box is initialized ... - ebegin "Activating (possible) swap" - /sbin/swapon -a &> /dev/null + # but not before evms_activate! -u 20031224 + #ebegin "Activating (possible) swap" + #/sbin/swapon -a &> /dev/null eend 0 # Set the console loglevel to 1 for a cleaner boot @@ -411,9 +412,9 @@ echo; echo /sbin/sulogin ${CONSOLE} einfo "Unmounting filesystems" - /bin/mount -a -o remount,ro & >/dev/null + /bin/sync;/bin/mount -a -o remount,ro & >/dev/null einfo "Rebooting" - /sbin/reboot -f + /bin/sync;/sbin/reboot -f fi done # Check that $svcdir exists ...
/sbin/rc isnt a configuration script
As SpanKY said, it isn't a configuration script. I think most normal users will be irritated if complete baselayout is protected from being overwritten when it is updated. But to allow more customization with CONFIG_PROTECT the CONFIG_PROTECT code in portage could be updated to handle not only directories but also normal files. If a user really wants to protect some file like /sbin/rc from being overwritten he could add it to CONFIG_PROTECT
Created attachment 25243 [details, diff] portage.py.patch Just took a quick look at the portage code. Don't know if this is a really enough to allow CONFIG_PROTECT and CONFIG_PROTECT_MASK contain normal files to be protected, but generally this should do it.
sven: please move your patch to Bug 14321 ;) *** This bug has been marked as a duplicate of 14321 ***