WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

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

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] /etc/xen/scripts/network-bridge: line 118: sigerr: command not found
From: Katharina Haselhorst <brandlk@xxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 09 Jun 2010 18:35:34 +0200
Delivery-date: Wed, 09 Jun 2010 09:37:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Shredder/3.0.4
Hello,

> 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}

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

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.

Katharina


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-users] /etc/xen/scripts/network-bridge: line 118: sigerr: command not found, Katharina Haselhorst <=