diff options
author | EuAndreh <eu@euandre.org> | 2023-03-02 09:37:37 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-03-02 09:37:37 -0300 |
commit | 65355d2b76d0e241224b230d3257c7e60ee0c305 (patch) | |
tree | 2d06e3b154bb1e23e1e5faae814361f55e4f182c | |
parent | etc/git/config: core.quotepath = off (diff) | |
download | dotfiles-65355d2b76d0e241224b230d3257c7e60ee0c305.tar.gz dotfiles-65355d2b76d0e241224b230d3257c7e60ee0c305.tar.xz |
bin/reconfigure: Early exit when ran as root
-rwxr-xr-x | bin/reconfigure | 7 |
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 |