summaryrefslogtreecommitdiff
path: root/backend/backend.sh.in
diff options
context:
space:
mode:
authorAndreas Loibl <andreas@andreas-loibl.de>2011-03-19 10:27:38 +0100
committerAndreas Loibl <andreas@andreas-loibl.de>2011-03-19 10:27:38 +0100
commit7228f0930e62728f296e9635ec8f4ccc10db7888 (patch)
treeb07f99e5505ef82df53000d00486b4da592bbbc5 /backend/backend.sh.in
parentb07a96186e4d3027278d7e8c5379cd024b1857f2 (diff)
downloadacritoxinstaller-7228f0930e62728f296e9635ec8f4ccc10db7888.zip
acritoxinstaller-7228f0930e62728f296e9635ec8f4ccc10db7888.tar.gz
use "which" instead of full path for kdesu/ gksu
Diffstat (limited to 'backend/backend.sh.in')
-rwxr-xr-xbackend/backend.sh.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/backend.sh.in b/backend/backend.sh.in
index e461387..15912b6 100755
--- a/backend/backend.sh.in
+++ b/backend/backend.sh.in
@@ -55,9 +55,9 @@ function get_root()
exit $?
fi
if [ -z "$as_root" ]; then
- for as_root in /usr/bin/kdesu /usr/bin/gksu exec
+ for as_root in kdesu gksu exec
do
- [ -x $as_root ] && break
+ which $as_root &>/dev/null && break
done
fi
$as_root "$p" --pid $$ "${O_ARGS[@]}" &>/dev/null