[Pkg-sysvinit-devel] Bug#547343: initscripts: /etc/init.d/mountall.sh "failed" when /etc/mtab is a symlink to /proc/mounts

Jeffrey Sheinberg jeff at bsrd.net
Wed Sep 23 19:52:59 UTC 2009


On Fri, Sep 18, 2009 at 09:41:28PM +0200, Petter Reinholdtsen wrote:
> 
> [Jeffrey Sheinberg]
> > I tried it both ways, with /etc/mtab as a regular file, and as a
> > symlink to /proc/mounts - this error only occurs when /etc/mtab is a
> > symlink to /proc/mounts.
> 
> Hm.  Thought I had tested that and seen it working.  Can you provide
> the output when adding 'set -x' at the start of mountall.sh?
> 

Here it is, note that I also added "-v" option to the mount command,
as mount generally complains when asked to mount something that is
already mounted.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff -b -d -p -t -u -r1.1 /etc/init.d/mountall.sh
--- /etc/init.d/mountall.sh     2009-09-18 20:10:49-04  1.1
+++ /etc/init.d/mountall.sh     2009-09-19 16:01:41-04
@@ -21,12 +21,14 @@ if [ -r /etc/default/locale ]; then
         export LANG
 fi
 
+set -x
+
 do_start() {
         #
         # Mount local file systems in /etc/fstab.
         #
         mount_all_local() {
-            mount -a -t nonfs,nfs4,smbfs,cifs,ncp,ncpfs,coda,ocfs2,gfs,gfs2 \
+            mount -v -a -t nonfs,nfs4,smbfs,cifs,ncp,ncpfs,coda,ocfs2,gfs,gfs2 \
                 -O no_netdev
         }
         pre_mountall
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sat Sep 19 16:02:30 2009: net.ipv4.conf.all.log_martians = 1
Sat Sep 19 16:02:30 2009: done.
Sat Sep 19 16:02:30 2009: + do_start
Sat Sep 19 16:02:30 2009: + pre_mountall
Sat Sep 19 16:02:30 2009: + [ yes =  ]
Sat Sep 19 16:02:30 2009: + [ yes =  ]
Sat Sep 19 16:02:30 2009: + [ yes = no ]
Sat Sep 19 16:02:30 2009: + log_daemon_msg Will now mount local filesystems
Sat Sep 19 16:02:30 2009: + [ -z Will now mount local filesystems ]
Sat Sep 19 16:02:30 2009: + log_daemon_msg_pre Will now mount local filesystems
Sat Sep 19 16:02:30 2009: + :
Sat Sep 19 16:02:30 2009: + [ -z  ]
Sat Sep 19 16:02:30 2009: + echo -n Will now mount local filesystems:
Sat Sep 19 16:02:30 2009: Will now mount local filesystems:+ return
Sat Sep 19 16:02:30 2009: + mount_all_local
Sat Sep 19 16:02:30 2009: + mount -v -a -t nonfs,nfs4,smbfs,cifs,ncp,ncpfs,coda,ocfs2,gfs,gfs2 -O no_netdev
Sat Sep 19 16:02:30 2009: mount: tmpfs already mounted on /dev/shm
Sat Sep 19 16:02:30 2009: mount: proc already mounted
Sat Sep 19 16:02:30 2009: /dev/hda6 on /fs/dh type ext3 (rw,grpid,usrquota)
Sat Sep 19 16:02:30 2009: /dev/hda7 on /fs/dc type ext3 (rw,grpid,usrquota)
Sat Sep 19 16:02:30 2009: + log_end_msg 96
Sat Sep 19 16:02:30 2009: + [ -z 96 ]
Sat Sep 19 16:02:30 2009: + retval=96
Sat Sep 19 16:02:30 2009: + log_end_msg_pre 96
Sat Sep 19 16:02:30 2009: + :
Sat Sep 19 16:02:30 2009: + log_use_fancy_output
Sat Sep 19 16:02:30 2009: + TPUT=/usr/bin/tput
Sat Sep 19 16:02:30 2009: + EXPR=/usr/bin/expr
Sat Sep 19 16:02:30 2009: + [ -t 1 ]
Sat Sep 19 16:02:30 2009: + [ xlinux !=  ]
Sat Sep 19 16:02:30 2009: + [ xlinux != xdumb ]
Sat Sep 19 16:02:30 2009: + [ -x /usr/bin/tput ]
Sat Sep 19 16:02:30 2009: + [ -x /usr/bin/expr ]
Sat Sep 19 16:02:30 2009: + /usr/bin/tput hpa 60
Sat Sep 19 16:02:30 2009: + /usr/bin/tput setaf 1
Sat Sep 19 16:02:30 2009: + [ -z ]
Sat Sep 19 16:02:30 2009: + FANCYTTY=1
Sat Sep 19 16:02:30 2009: + true
Sat Sep 19 16:02:30 2009: + /usr/bin/tput setaf 1
Sat Sep 19 16:02:30 2009: + RED=^[[31m
Sat Sep 19 16:02:30 2009: + /usr/bin/tput setaf 3
Sat Sep 19 16:02:30 2009: + YELLOW=^[[33m
Sat Sep 19 16:02:30 2009: + /usr/bin/tput op
Sat Sep 19 16:02:30 2009: + NORMAL=^[[39;49m
Sat Sep 19 16:02:30 2009: + [ 96 -eq 0 ]
Sat Sep 19 16:02:30 2009: + [ 96 -eq 255 ]
Sat Sep 19 16:02:30 2009: + /bin/echo -e  ^[[31mfailed!^[[39;49m
Sat Sep 19 16:02:30 2009:  ^[[31mfailed!^[[39;49m
Sat Sep 19 16:02:30 2009: + log_end_msg_post 96
Sat Sep 19 16:02:30 2009: + :
Sat Sep 19 16:02:30 2009: + return 96

> I assume you are aware of the problems with /etc/mtab being a symlink
> as reported in #494001.
> 

Yes, I read the gory details of #494001, that's why I kept the symlink.

Thanks,
-- 
Jeffrey Sheinberg





More information about the Pkg-sysvinit-devel mailing list