Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 40884 - request to make /sbin/rc customizable
Summary: request to make /sbin/rc customizable
Status: RESOLVED DUPLICATE of bug 14321
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High critical (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-08 14:08 UTC by Brad Allen
Modified: 2005-07-17 13:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
portage.py.patch (portage.py.patch,636 bytes, patch)
2004-02-09 02:07 UTC, Sven Wegener
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brad Allen 2004-02-08 14:08:10 UTC
/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 ...
Comment 1 SpanKY gentoo-dev 2004-02-08 14:14:49 UTC
/sbin/rc isnt a configuration script
Comment 2 Sven Wegener gentoo-dev 2004-02-09 02:01:00 UTC
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
Comment 3 Sven Wegener gentoo-dev 2004-02-09 02:07:06 UTC
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.
Comment 4 SpanKY gentoo-dev 2004-02-09 06:30:38 UTC
sven: please move your patch to Bug 14321 ;)

*** This bug has been marked as a duplicate of 14321 ***