[Pkg-sysvinit-devel] Bug#633541: umountroot: shouldn't run mkdir /var/lock

Roger Leigh rleigh at codelibre.net
Mon Jul 11 12:37:51 UTC 2011


On Thu, Jun 30, 2011 at 10:58:52PM -0300, ROGERIO DE CARVALHO BASTOS wrote:
> During shutdown umountroot script fail when run 'mkdir /var/lock'
> because this is a symbolic link to /run/lock.

From the script:

        # These directories must exist on the root filesystem as they are
        # targets for system mountpoints.  We've just unmounted all other
        # filesystems, so either they are mounted now (in which case the
        # mount point exists) or we can make the mountpoint.
        for dir in /proc /sys /var/run /var/lock; do
            mkdir -p $dir || true
        done

It's not clear from this /why/ these directories need creating
*at shutdown*.  /proc and /sys should exist anyway.  And /var/run
and /var/lock will have been umounted (and anything wanting them
this late in the shutdown sequence must use /run now in any case).
It also assumes that the rootfs was writable to begin with, which
is not always true.

Is there any reason to keep this logic, or can the entire above
block of code be deleted?


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20110711/074f54c4/attachment.pgp>


More information about the Pkg-sysvinit-devel mailing list