[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] /etc/xen/scripts/network-bridge: line 118: sigerr: command not found


> Any news?

I think I found the problem and a possible workaround:

in the function _claim_lock() in locking.sh a trap call on ERR is done (trap "release_lock $1; sigerr" ERR) which will trap all commands exiting with a non-zero status. The problem is in the function do_ifup() in the network-bridge script: if no default gateway is found for the specified interface (e.g. because it's not the main interface but only connected to some internal network), the statement '[ -n "$gateway" ] && ip route add default via ${gateway}' will exit with non-zero code. This itself does not cause the trap (because it is inside a && statement) but the whole function will exit with the exit code of the last statement and thus 'do_ifup $bridge' (in op_start()) will return non-zero causing the trap...

A workaround is to substitute
[ -n "$gateway" ] && ip route add default via ${gateway}

if [ -n "$gateway" ]; then
            ip route add default via ${gateway}

In previous xen releases (I don't know exactly when they changed it) there were no calls to claim_lock and release_lock in the network-bridge script, so no error either :)

Does anyone know what the call to sigerr inside the trap command is for? As far as I know it is not a built-in bash command nor some common linux programm... that's why the message "command not found" is returned - not a very helpful message though.


Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.