mirror of
https://github.com/the-sane/lug-helper.git
synced 2024-12-28 15:14:19 +00:00
Fallback to sudo where pollkit is unavailable
This commit is contained in:
parent
478ff37b8a
commit
7b7460fa0d
@ -1080,7 +1080,12 @@ preflight_check() {
|
||||
|
||||
# Execute the actions set by the functions
|
||||
if [ ! -z "$preflight_actions_string" ]; then
|
||||
pkexec sh -c "$preflight_actions_string"
|
||||
# Use pollkit's pkexec for gui with a fallback to sudo
|
||||
if [ -x "$(command -v pkexec)" ]; then
|
||||
pkexec sh -c "$preflight_actions_string"
|
||||
else
|
||||
sudo sh -c "$preflight_actions_string"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Call any followup functions
|
||||
|
Loading…
Reference in New Issue
Block a user