Fixed fast settings "norootwarn" to actually apply

This commit is contained in:
JeremyStarTM 2022-08-14 21:20:37 +02:00
parent 40de0a7f1a
commit 060c93c1d6

View file

@ -282,12 +282,12 @@ function checkRootUser() {
function checkFastSettings() {
if [ -f "$HOME/.sostools/git/norootwarn" ] || [ -d "$HOME/.sostools/git/norootwarn" ]; then
rm -rf "$HOME/.sostools/git/norootwarn"
echo -e "# This file has been generated by sos-git\n# because of the use of fast settings.\nSOSGIT_NOROOTWARN=true" &> "$HOME/.sostools/git/sos-git.conf.d/norootwarning.conf"
echo -e "# This file has been generated by sos-git\n# because of the use of fast settings.\nSOSGIT_NOROOTWARNING=true" &> "$HOME/.sostools/git/sos-git.conf.d/norootwarning.conf"
fi
if [ "$(whoami)" == "root" ]; then
if [ -f "/etc/sostools/git/norootwarn" ] || [ -d "/etc/sostools/git/norootwarn" ]; then
rm -rf "/etc/sostools/git/norootwarn"
echo -e "# This file has been generated by sos-git\n# because of the use of fast settings.\nSOSGIT_NOROOTWARN=true" &> "/etc/sostools/git/sos-git.conf.d/norootwarning.conf"
echo -e "# This file has been generated by sos-git\n# because of the use of fast settings.\nSOSGIT_NOROOTWARNING=true" &> "/etc/sostools/git/sos-git.conf.d/norootwarning.conf"
fi
fi
}