Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
Fix for Bug 6962
Browse files Browse the repository at this point in the history
  • Loading branch information
timf committed Apr 12, 2010
1 parent 10030d4 commit 6794454
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions control/libexec/workspace-control/kvm-ebtables-config.sh
Expand Up @@ -49,6 +49,14 @@ EBTABLES=ebtables
#EBTABLES=/sbin/ebtables
#EBTABLES=/usr/sbin/ebtables

FLOCKFILE=/var/lock/ebtables.config.lock
FLOCK=/usr/bin/flock
if [ ! -f $FLOCK ]; then
echo "*** can not find flock program, disabling"
echo "*** disabling flock might result in a error like \"kernel doesn't support a certain ebtables extension\""
FLOCK=/bin/true
fi


#############
# ARGUMENTS #
Expand Down Expand Up @@ -158,6 +166,8 @@ function rem_input_rule() {
##########################
#### SUBCOMMAND IMPLS ####
##########################
(
$FLOCK -x 200

if [ "$ADDREM" = "rem" ]; then

Expand Down Expand Up @@ -203,3 +213,5 @@ if [ "$ADDREM" = "add" ]; then
exit 0
fi
fi

) 200>$FLOCKFILE
12 changes: 12 additions & 0 deletions control/libexec/workspace-control/xen-ebtables-config.sh
Expand Up @@ -56,6 +56,14 @@ EBTABLES=ebtables
#EBTABLES=/sbin/ebtables
#EBTABLES=/usr/sbin/ebtables

FLOCKFILE=/var/lock/ebtables.config.lock
FLOCK=/usr/bin/flock
if [ ! -O $FLOCK ]; then
echo "*** can not find flock program, disabling"
echo "*** disabling flock might result in a error like \"kernel doesn't support a certain ebtables extension\""
FLOCK=/bin/true
fi


#############
# ARGUMENTS #
Expand Down Expand Up @@ -197,6 +205,8 @@ function rem_forward_rule() {
##########################
#### SUBCOMMAND IMPLS ####
##########################
(
$FLOCK -x 200

if [ "$ADDREM" = "rem" ]; then

Expand Down Expand Up @@ -251,3 +261,5 @@ if [ "$ADDREM" = "add" ]; then
exit 0
fi
fi

) 200>$FLOCKFILE

0 comments on commit 6794454

Please sign in to comment.