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.
This commit is contained in:
Paul R Joslin 2021-09-23 16:34:52 -04:00 committed by GitHub
parent 1d1e21dc10
commit 9600e253bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,9 @@
#! /bin/bash
if (($(id -u) != 0))
then
printf "If you see 'ping: socket: Operation not permitted' errors, "
printf "run this command as root.\n"
fi
set -xu