Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix a bug in warden, use the specified default interface

  • Loading branch information...
commit e4da50e6b66d1752f25ca4e88365689714f925d5 1 parent c79bd1a
@kmoore134 kmoore134 authored
View
9 src-sh/warden/scripts/backend/startjail.sh
@@ -284,6 +284,7 @@ then
fi
IFACE=
+
DEFAULT=0
# Make sure jail uses special interface if specified
@@ -291,8 +292,12 @@ if [ -e "${JMETADIR}/iface" ] ; then
IFACE=`cat "${JMETADIR}/iface"`
fi
if [ -z "${IFACE}" ] ; then
- IFACE=`get_default_interface`
- DEFAULT=1
+ if [ -n "$NIC" ] ; then
+ IFACE="$NIC"
+ else
+ IFACE=`get_default_interface`
+ DEFAULT=1
+ fi
fi
if [ -z "${IFACE}" ] ; then
echo "ERROR: no interface specified and a default doesn't exist!"
View
8 src-sh/warden/scripts/backend/stopjail.sh
@@ -51,8 +51,12 @@ if [ -e "${JMETADIR}/iface" ] ; then
IFACE=`cat "${JMETADIR}/iface"`
fi
if [ -z "${IFACE}" ] ; then
- IFACE=`get_default_interface`
- DEFAULT=1
+ if [ -n "$NIC" ] ; then
+ IFACE="$NIC"
+ else
+ IFACE=`get_default_interface`
+ DEFAULT=1
+ fi
fi
if [ -z "${IFACE}" ] ; then
echo "ERROR: no interface specified and a default doesn't exist!"
Please sign in to comment.
Something went wrong with that request. Please try again.