On 4/27/07, Jorge Almeida <[EMAIL PROTECTED]> wrote:
> /etc/rc.d/init.d/checkfs
> (...)
> boot_mesg "Mounting root file system in read-only mode..."
> mount -n -o remount,ro / >/dev/null
> evaluate_retval
>
> if [ ${?} != 0 ]; then
> echo_failure
> boot_mesg -n "FAILURE:\n\nCannot check root" ${FAILURE}
>
> But evaluate_retval always returns 0...
> Shouldn't it return the value of $? that was set when it was called? Or
> should checkfs be changed?
Good catch. I think evaluate_retval always returns 0 to prevent
trivial errors from bombing init. I don't know if that's right, but I
think a lot of things would break if that was changed.
You can just remove the evaluate_retval line since the next two are
exactly recreating what it does. However, you'd want to add an "else
echo_ok" at the bottom of the conditional so that you still get your
happy "OK" if everything went as expected.
--
Dan
--
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page