trb.sh: require pkexec instead of falling back to gksudo
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,15 +6,11 @@ if [ ! -f /usr/bin/zenity ];then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
distro=$(lsb_release -a | grep -o "VoidLinux")
|
if ! command -v pkexec >/dev/null 2>&1;then
|
||||||
|
echo "pkexec not installed (install polkit)..."
|
||||||
auth_prompt_path=$(which pkexec)
|
exit 1
|
||||||
|
|
||||||
if [ -f ${auth_prompt_path} ];then
|
|
||||||
su_prompt="pkexec"
|
|
||||||
else
|
|
||||||
su_prompt="gksudo"
|
|
||||||
fi
|
fi
|
||||||
|
su_prompt="pkexec"
|
||||||
|
|
||||||
zenity --question --text "Do you want to trim?"
|
zenity --question --text "Do you want to trim?"
|
||||||
if [[ $? == 1 ]];then
|
if [[ $? == 1 ]];then
|
||||||
|
|||||||
Reference in New Issue
Block a user