Subject: Re: boot sequence problems
To: Dan McMahill <email@example.com>
From: David Brownlee <firstname.lastname@example.org>
Date: 05/24/1998 18:34:53
If you can live with ipnat not being started until the end of
bootup then /etc/rc.local would be the ideal place to put it.
-=- "Why am I seething with this animosity" -=-
On Sun, 24 May 1998, Dan McMahill wrote:
> I just replaced the drive on my machine and at the same time went
> to seperate / and /usr partitions. After that the machine would
> not boot properly due to the order in which /etc/rc does things.
> The relevent stuff from /etc/rc is:
> umount -a >/dev/null 2>&1
> mount /
> # set hostname, turn on network
> echo 'starting network'
> sh /etc/netstart
> if [ $? -ne 0 ]; then
> exit 1
> for fs in /usr /var $critical_filesystems; do
> mount | (
> while read what _on on _type type; do
> if [ $on = $fs ]; then
> if [ $ismounted = no ]; then
> mount $fs >/dev/null 2>&1
> # "Critical" file systems are now mounted.
> The problem is this. The last line of /etc/netstart has
> if [ -s /etc/netstart.local ]; then
> . /etc/netstart.local
> and in /etc/netstart.local I have:
> dhclient ae1
> CONFLINE="map ae1 10.0.0.0/8 -> `ifconfig ae1 | grep "inet.*netmask" | cut -d " " -f 2 `/32 portmap
> tcp/udp 10000:20000"
> #CONFLINE="map ppp0 10.0.0.0/8 -> 22.214.171.124/32 portmap tcp/udp 10000:20000"
> echo $CONFLINE > /etc/ipnat.conf
> ipnat -f /etc/ipnat.conf
> Anyway the problem is that 'grep', and 'cut' live in /usr/bin and 'ipnat' lives
> in '/usr/sbin' but at this point /usr has not been mounted yet. For now I've
> simply put
> mount /usr >/dev/null 2>&1
> in /etc/rc just before the netstart stuff.
> Is this the "right way" to make it work? Should the mounting of critical
> file systems come before the network (or is this a problem for machines
> who nfs mount /usr). Perhaps there's a better way to start ipnat and dhcp?
> -- Dan