[Pkg-sysvinit-devel] Bug#390404: initscripts:
/etc/network/if-up.d/mountnfs does not mount nfs directory at
boot time
Chaogui Zhang
czhang at marywood.edu
Mon Oct 2 03:30:43 UTC 2006
On Sun, Oct 01, 2006 at 08:03:25PM +0200, Petter Reinholdtsen wrote:
>
> > The NFS directory listed in /etc/fstab is not mounted. Tried using
> > the /etc/network/if-up.d/mountnfs script manually and it didn't work
> > either (without giving any error message).
>
> Hm, strange. Can you try to run it using 'sh -x
> /etc/network/if-up.d/mountnfs' to see what is going wrong?
The output of `sh -x /etc/network/if-up.d/mountnfs' (see below) made it
clear that the lock directory `/var/run/network/mountnfs' was not removed
properly at some point (when it should have been). I manually removed
it, and the script works now. The new question now is, why wasn't the lock
directory removed properly?
-------------Output of `sh -x /etc/network/if-up.d/mountnfs'--------
+ PATH=/sbin:/bin
+ . /lib/init/vars.sh
++ '[' -f /etc/default/rcS ']'
++ . /etc/default/rcS
+++ TMPTIME=0
+++ SULOGIN=no
+++ DELAYLOGIN=yes
+++ UTC=no
+++ VERBOSE=yes
+++ EDITMOTD=yes
+++ FSCKFIX=no
++ '[' '!' -e /proc/cmdline ']'
++ egrep -qw quiet /proc/cmdline
++ '[' '' ']'
+ . /lib/lsb/init-functions
++ '[' -e /etc/lsb-base-logging.sh ']'
++ true
+ . /lib/init/mount-functions.sh
+ '[' '' '!=' lo ']'
+ mkdir /var/run/network
+ true
+ mkdir /var/run/network/mountnfs
+ exit 0
-------------End of the output of `sh -x /etc/network/if-up.d/mountnfs'---
>
> If your problem is related to the rewrite to use ifup scripts, it was
> introduced in version 2.86.ds1-16.
>
> I have no idea what can be wrong. It is reported to work for others.
> Can you provide a copy of your /etc/network/interfaces and /etc/fstab?
As mentioned above, the problem doesn't seem to be the script not
working with mounting the nfs directory, but rather that somehow the
lock directory was not deleted when it should have been. Just in case
this might be useful, I am still pasting the content of my /etc/fstab
and /etc/network/interfaces below.
I won't be able to test if I can reproduce the problem (not deleting the
directory /var/run/network/mountnfs). Manual execution of the script
/etc/network/if-up.d/mountnfs now works perfectly. I will reboot the
system tomorrow when I get in my office and see if things will be
different at boot time (I doubt it).
The problem came up when I upgraded my entire unstable system a few days
ago and that is probably when that lock directory was left behind for
some reason.
---------------------/etc/fstab-----------------------------
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda2 / ext3 defaults,errors=remount-ro 0
1
#/dev/hda5 /home ext3 defaults 0 2
10.100.0.163:/home /home nfs rw,rsize=4096,wsize=4096,hard,intr,nodev,nosuid 0 0
/dev/hda6 /usr ext3 defaults 0 2
/dev/hda7 /var ext3 defaults 0 2
/dev/hda3 none swap sw 0 0
/dev/hdc /media/cdrom0 iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
---------------------End of /etc/fstab-----------------------------
-------------------/etc/network/interfaces----------------------
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface using dhcp
#auto eth0
#iface eth0 inet dhcp
#name Ethernet LAN card
# The primary network interface static configuration
auto eth0
iface eth0 inet static
address 10.6.0.71
netmask 255.0.0.0
gateway 10.0.0.1
name Ethernet LAN card
auto eth0:0
iface eth0:0 inet static
address 10.100.0.164
netmask 255.255.0.0
--------------------end of /etc/network/interfaces---------------
More information about the Pkg-sysvinit-devel
mailing list