From 5ea389182e56c6189e418deff8df282f393f9eb4 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 12 Aug 2011 23:14:27 +0200 Subject: retiolum tinc_setup: go sudo --- retiolum/scripts/tinc_setup/install.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'retiolum') diff --git a/retiolum/scripts/tinc_setup/install.sh b/retiolum/scripts/tinc_setup/install.sh index 9df38df7..0902d417 100755 --- a/retiolum/scripts/tinc_setup/install.sh +++ b/retiolum/scripts/tinc_setup/install.sh @@ -1,5 +1,12 @@ #! /bin/sh # USE WITH GREAT CAUTION +set -euf + +if test "${nosudo-false}" != true -a `id -u` != 0; then + echo "we're going sudo..." >&2 + exec sudo "$0" "$@" + exit 23 # go to hell +fi #make -C ../../ update set -e -- cgit v1.2.3