About 2.3.7

Simon Perreault nomis80 at yahoo.com
Thu Aug 10 07:41:14 PDT 2000

> So before the echo's start I tried to do:
>         error_value=$?
> That didn't work, it was set to zero as well. So I've changed the
> sentences to the following and made it a function:
> print_error_msg()
> {
>         echo
>         $FAILURE
>         echo -n "You should not read this error message. It means "
>         echo "that an unforseen error "
>         echo -n "took place and subscript $i exited with "
>         echo "return value "
>         echo -n "other than 0 for an unknown reason. If you're able "
>         echo "to trace this error down "
>         echo -n "to a bug in one of the files provided by this book, "
>         echo "please be so kind to "
>         echo -n "inform us at lfs-discuss at linuxfromscratch.org"
>         $NORMAL
>         echo
> }
> instead or repeating it three times throughout the rc file.

Nice. But I'm fairly sure that there is a way to use "somevar=$?" just
after the sub-script exited. I used this method several times, and it
works. Did you use "somevar=$?" after the test? If so, then you're
recording the exit value of the test ([...]). Anyway, putting this
inside a function is better.
Mail archive: http://www.pcrdallas.com/mail-archives/lfs-discuss
IRC access: server: irc.linuxfromscratch.org port: 6667 channel: #LFS
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