bug in checkroot script

Gerard Beekmans gerard at linuxfromscratch.org
Sat Jun 3 22:39:01 PDT 2000

> Hello folks,
> I just noticed the following in the checkroot-rc-Script as published
> in LFS-2.3.3. Hope this hasn't been posted here 100 times yet:
>      #!/bin/sh
>      # Begin /etc/init.d/checkroot
>      echo -n "Activating swap..."
>      /sbin/swapon -a
>      if [ -f /fastboot ]
> What if we are not fastbooting? The following code up to the last if
> isn't being executed at all. Also don't we have to remove the fastboot
> file after evaluating it? As it seems, fsck will be executed _only_ if
> /fastboot is present. So we don't get fscks on a normal installation
> at all currently.
>      then
>        echo "Fast boot, no file system check"
>        /bin/mount -n -o remount,ro /
> I guess we should have an "else" here.

Seems 'else' took a vacation with me. My LFS system has else in it and
it was copied from LFS-2.3.2 and I made no changes in the bootscripts
(at leats not in the checkroot.sgml file so it beats me how it
disappeared. I'll fix it though of course)
>        if [ $? = 0 ]
> Can mount return a non-zero value in this setup?

Couldn't find such info in the man page so I assume non-zero is failure.
If you have documentation saying otherwise, please let us know.
Gerard Beekmans

-*- If Linux doesn't have the solution, you have the wrong problem -*-
Mail archive: http://www.pcrdallas.com/mail-archives/lfs-discuss
IRC access: server: irc.linuxfromscratch.org port: 6667 channel: #LFS
News Reader access: news.pcrdallas.com
Unsubscribe: email lfs-discuss-request at linuxfromscratch.org and put
"unsubscribe" (without the quotation marks) in the body of the message
(no subject is required)

More information about the lfs-dev mailing list