/etc/rc.sysinit suggested improvement

ray hammond ray.hammond at ntlworld.com
Sun Aug 27 23:08:45 UTC 2006


This is my first post, so I apologies for any breaches of list etiquette.

As a personal education project I have been learning the internals of the
Linux boot process.  Init calls the shell script /etc/rc.sysinit, in my
opinion and to my surprise I've spotted a few items which I personally would
alter.   

For example, line 20 mounts the /proc directory.  Prior to this, no checks
are performed to ensure:

	a) mount exists 
	b) mount is executable
	c) mount success

As an experiment, I then removed the execute permission from mount and
rebooted my system.  Of course the boot procedure failed miserably.  I am
quite aware that my actions were silly and the chances of this happening are
minimum; however, Sods' laws applies "If there are two or more ways to do
something, and one of those ways can result in a catastrophe, then someone
will do it (me, :-) ).".  The change I suggest, would first check for the
existence of mount, then ensure it is executable and finally check mount
return code (assuming their is one).  Furthermore, if possible, the script
could even correct the permission problem.  

Similar thoughts also apply to several other lines within the script; I
won't go into these, until I read your opinions.  Am I, miss-understanding a
fundamental point, or just taking rubbish? 





More information about the fedora-devel-list mailing list