From f2c81d3bb484d27a9af019d3934fbf4620e9514d Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 24 Jan 2025 16:28:30 +0100 Subject: sbin/: Check if script is running as root. --- sbin/diskless-workstation-shell.bullseye | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sbin/diskless-workstation-shell.bullseye') diff --git a/sbin/diskless-workstation-shell.bullseye b/sbin/diskless-workstation-shell.bullseye index ec9acc8..e764684 100755 --- a/sbin/diskless-workstation-shell.bullseye +++ b/sbin/diskless-workstation-shell.bullseye @@ -17,6 +17,12 @@ # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +if [ $(id -u) -gt 0 ]; then + echo "ERROR: This script has to run as super-user root." + exit 1 +fi + + set -e VERSION=0.3 -- cgit v1.2.3