Minor bug in subroutines-linux:161 (and fix)

W. Borgert debacle at debian.org
Wed Nov 5 22:21:36 CET 2003


Hi,

first the return value of a remote call to test -s is queried:

    testcmd="test -s /boot/fai/$HOSTNAME-localboot ; echo \$?"
    ret=`$FAI_REMOTESH -l $LOGUSER ${SERVER} "$testcmd"`

If rsh fails (here: permission problems), $ret is empty and

    if [ "$ret" -ne 0 ]; then

is invalid.  Please, insert something like this before:

    if [ -z "$ret" ]; then
        echo "Big problem.  Call the FAI hotline."
        ret = 0
    fi

Cheers, WB



More information about the linux-fai mailing list