[Pkg-sysvinit-devel] Bug#494001: Bug#494001: Minimum kernel requirement for Squeeze

Roger Leigh rleigh at codelibre.net
Thu Jun 4 18:05:15 UTC 2009


On Wed, Jun 03, 2009 at 05:57:34PM +1000, Kel Modderman wrote:
> On Saturday 30 May 2009 20:39:42 Roger Leigh wrote:
> > > Can you have a good look at [0] for errors please?
> > > 
> > > [0] http://lists.alioth.debian.org/pipermail/pkg-sysvinit-commits/2009-May/001220.html
> > 
> > It looks fine.  The only slight oddity is the slight difference in logic
> > between checkroot.sh and postinst.  In particular, the need for
> > 
> >   touch /etc/mtab
> > 
> > in checkroot.sh
> > 
> > This uses:
> >         if [ Linux = "$KERNEL" ] && [ ! -L /etc/mtab ] && [ -f /proc/mounts ]
> >         then
> >                 if touch /etc/mtab >/dev/null 2>&1
> >                 then
> >                         rm -f /etc/mtab && ln -s /proc/mounts /etc/mtab
> >                 else
> >                         log_warning_msg "cannot symlink /etc/mtab to /proc/mounts"
> >                 fi
> >         fi
> > 
> > whereas the initscripts postinst uses:
> > 
> > if [ "$(uname -s)" = "Linux" ]
> > then
> >         if [ -f /etc/mtab ] && [ ! -L /etc/mtab ] && [ -f /proc/mounts ]
> >         then
> >                 rm -f /etc/mtab && ln -s /proc/mounts /etc/mtab
> >         fi
> > fi
> > 
> > I'm guessing here it's to cope with a read-only root on startup that the
> > postinst doesn't need to care about.
> 
> Yeah. Is that odd? Does it need a comment?

I think a comment by the touch to say why it's there (for the
read-only root on startup) will save (at least me) future
hours of headscratching working out why it was put there.
And it will make it harder for anyone to inadvertently removing
a "pointless" line in the script in the future.


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.



More information about the Pkg-sysvinit-devel mailing list