networking.sh - should run as root. (#7329)
If networking.sh is run by a non-root user, "ping: socket: Operation not permitted" may result. This adds a test & warning.
Paul R Joslin committed
Sep 23, 2021 at 16:34 UTC
9600e253bd4bd248b8c8f186183ab76da10188db
1 file changed
+5
diagnostics/networking.sh
+5
@@ -1,4 +1,9 @@
1
#! /bin/bash
2
+ if (($(id -u) != 0))
3
+ then
4
+ printf "If you see 'ping: socket: Operation not permitted' errors, "
5
+ printf "run this command as root.\n"
6
+fi
7
8
set -xu
9