From 344caa700d6f8c116c002fc23a17909a136f72d9 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Thu, 16 May 2024 21:04:01 +0300 Subject: [PATCH] Init-browser-policies.bash: how about not making recursive symlinks in the first place? Properly resolves: 0ce24f54d90a5ab83c71db903dd1425ac326d125 --- etc/init-browser-policies.bash | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/etc/init-browser-policies.bash b/etc/init-browser-policies.bash index 14ba36dd..73131f49 100755 --- a/etc/init-browser-policies.bash +++ b/etc/init-browser-policies.bash @@ -17,9 +17,16 @@ touch /etc/firefox/policies/policies.json chmod -v a+r /etc/firefox/policies/policies.json printf "WARNING! LibreWolf default profile may be masked!\nhttps://codeberg.org/librewolf/issues/issues/1767\n" +# Note to self on ln: +# -s is obviously symbolic link. +# -n will not follow symlink if it's a directory stopping the symlinks. +# pointing to the directory containing them. +# -v is obviously verbose. +# -f is obviously force so there won't be error message about it already +# existing. + # Firefox ESR -ln -sfv /etc/firefox /etc/firefox-esr -rm -fv /etc/firefox-esr/firefox-esr +ln -fnsv /etc/firefox /etc/firefox-esr # Chromium mkdir -vp /etc/opt/chromium/policies/managed @@ -28,21 +35,17 @@ mkdir -vp /etc/opt/chromium/policies/recommended chmod -v a+rx /etc/opt/chromium/policies/{managed,recommended}/ # Brave -ln -sfv /etc/opt/chromium /etc/brave -rm -fv /etc/brave/brave +ln -fnsv /etc/opt/chromium /etc/brave # Vivaldi -ln -sfv /etc/opt/chromium /etc/chromium -rm -fv /etc/chromium/chromium +ln -fnsv /etc/opt/chromium /etc/chromium # Google Chrome -ln -sfv /etc/opt/chromium /etc/opt/chrome -rm -fv /etc/etc/opt/chrome/chrome +ln -fnsv /etc/opt/chromium /etc/opt/chrome # Microsoft Edge # I used to have a separate policy for it so remember to remove this manually # if it exists! -ln -sfv /etc/opt/chromium /etc/opt/edge -rm -fv /etc/opt/edge/edge +ln -fnsv /etc/opt/chromium /etc/opt/edge set +x