Added fast settings and changed root warning
This commit is contained in:
parent
f986307683
commit
a0d749b03c
1 changed files with 16 additions and 4 deletions
20
sos-git.sh
20
sos-git.sh
|
@ -274,13 +274,25 @@ function checkRootUser() {
|
|||
echo " Please switch to a normal account, unless"
|
||||
echo " the repository asks for these permissions."
|
||||
echo ""
|
||||
echo " To disable this warning, create a file at"
|
||||
echo " \"$HOME/.sostools/git/sos-git.conf.d/norootwarning.conf\" or"
|
||||
echo " \"/etc/sostools/git/sos-git.conf.d/norootwarning.conf\" with"
|
||||
echo " the content \"SOSGIT_NOROOTWARNING=true\"."
|
||||
echo " To disable this warning, create a file"
|
||||
echo " at \"$HOME/.sostools/git/norootwarn\""
|
||||
echo " or \"/etc/sostools/git/norootwarn\""
|
||||
fi
|
||||
}
|
||||
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"
|
||||
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"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
loadDefaultConfiguration
|
||||
checkFastSettings
|
||||
loadSystemConfiguration
|
||||
loadUserConfiguration
|
||||
doSystemSetup
|
||||
|
|
Reference in a new issue