aboutsummaryrefslogtreecommitdiff
path: root/bin/reconfigure
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-03-02 09:37:37 -0300
committerEuAndreh <eu@euandre.org>2023-03-02 09:37:37 -0300
commit65355d2b76d0e241224b230d3257c7e60ee0c305 (patch)
tree2d06e3b154bb1e23e1e5faae814361f55e4f182c /bin/reconfigure
parentetc/git/config: core.quotepath = off (diff)
downloaddotfiles-65355d2b76d0e241224b230d3257c7e60ee0c305.tar.gz
dotfiles-65355d2b76d0e241224b230d3257c7e60ee0c305.tar.xz
bin/reconfigure: Early exit when ran as root
Diffstat (limited to 'bin/reconfigure')
-rwxr-xr-xbin/reconfigure7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/reconfigure b/bin/reconfigure
index 7e49f00..af94f48 100755
--- a/bin/reconfigure
+++ b/bin/reconfigure
@@ -62,6 +62,13 @@ done
shift $((OPTIND - 1))
+if [ "$(id -un)" = 'root' ]; then
+ printf 'This script must *not* be run as root.\n\n' >&2
+ usage >&2
+ exit 2
+fi
+
+
HOSTNAME="$(hostname)"
if [ -e /run/current-system/configuration.scm ]; then