Update
have improved sudo check
This commit is contained in:
1 parent
68b807c563
commit
523ec87db5
1 file changed
+5
-6
@@ -2,20 +2,19 @@
|
|||||||
|
|
||||||
# Debian XFCE init and setup
|
# Debian XFCE init and setup
|
||||||
|
|
||||||
|
logo
|
||||||
# Check for sudo access
|
# Check for sudo access
|
||||||
if [[ $(id -u) = 0 ]]; then
|
if [[ $(id -u) = 0 ]]; then
|
||||||
echo "Please run as normal user"
|
echo "Please run as normal user"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudoFunc () {
|
echo "Please put in password for sudo"
|
||||||
|
# Must be running as sudo
|
||||||
# Must be running as sudo
|
if [[ $(sudo id -u) != 0 ]]; then
|
||||||
if [[ $(id -u) != 0 ]]; then
|
|
||||||
echo "Sudo authentication failed. Please try again"
|
echo "Sudo authentication failed. Please try again"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
}
|
|
||||||
|
|
||||||
# Prompt for elevated prompt for scripts
|
# Prompt for elevated prompt for scripts
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user