usability: check that script is being run as root
so we can display a nicer error if not
This commit is contained in:
1 parent
9c5603ebe7
commit
fa5a5f46b4
1 file changed
+5
@@ -18,6 +18,11 @@ usage() {
|
||||
|
||||
shift 2 || usage
|
||||
|
||||
[ `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