move the most important check first
This commit is contained in:
1 parent
d8cc45c650
commit
180c142964
1 file changed
+5
-5
+5
-5
@@ -8,6 +8,11 @@ usage() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
[ `id -u` = 0 ] || {
|
||||
echo "weave must be run as 'root'"
|
||||
exit 1
|
||||
}
|
||||
|
||||
[ $# -gt 1 ] || usage
|
||||
|
||||
BRIDGE=weave
|
||||
@@ -20,11 +25,6 @@ IPADDR=$2
|
||||
|
||||
shift 2
|
||||
|
||||
[ `id -u` = 0 ] || {
|
||||
echo "weave must be run as 'root'"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# pre-create bridge so we can set the MTU
|
||||
[ ! -d /sys/class/net/$BRIDGE ] && {
|
||||
ip link add dev $BRIDGE type bridge
|
||||
|
||||
Reference in new issue
Block a user