hi,
you are right error handling is important
may be can redefine croak() to


error() {
       echo "$tag: $*" >&2
       exit 1
}

additional points for having logger: (maybe this is to much but i am not sure)

if [ -x /usr/bin/logger ]
then
        ECHO=/usr/bin/logger -s -t $(basename $0)
else
        ECHO=echo
fi


error() {
       $ECHO "$tag: $*"
       exit 1
}




that would simply e.g the ifconfig to:

 ifconfig $interface $ip $NETMASK $BROADCAST || error "failed to $1 $interface"


just my 2 cents,
re
 wh





Cristian Ionescu-Idbohrn schrieb:
> Cheers,
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> busybox mailing list
> [email protected]
> http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to