From a0795908b2632ebd251a81898e5f09be87363965 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Tue, 14 May 2024 10:25:49 +0300 Subject: [PATCH] init-browser-policies.bash: this script requires root by the way --- etc/init-browser-policies.bash | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/etc/init-browser-policies.bash b/etc/init-browser-policies.bash index bf3ee0a4..5e8d28fc 100755 --- a/etc/init-browser-policies.bash +++ b/etc/init-browser-policies.bash @@ -3,6 +3,12 @@ # their policies. The user is trusted to setup those manually. set -x +# Require root or exit +if [ "$(id -u)" != "0" ]; then + echo "This script requires root for managing /etc/" 1>&2 + exit 1 +fi + # Firefox and LibreWolf (caution! https://codeberg.org/librewolf/issues/issues/1767) mkdir -vp /etc/firefox/policies chmod -v a+rx /etc/firefox/