summaryrefslogtreecommitdiff
path: root/community/unetbootin/unetbootin.sh
blob: a6c8969b6848ea57375c091ffd15e6a798334381 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# wrapper script for starting unetbootin with root permissions
ELF=/usr/bin/unetbootin.elf
if [ -e /usr/bin/pkexec ]; then
  pkexec $ELF && exit 0
fi
if [ -z "$KDE_FULL_SESSION" ]; then
  if [ -e /usr/bin/gksudo ]; then
      gksudo $ELF && exit 0
  fi
  if [ -e /usr/bin/gksu ]; then
      gksu $ELF && exit 0
  fi
  echo "Could not use pkexec, gksudo or gksu"
  $ELF && exit 0 || exit 1
fi  
if [ -e /usr/bin/kdesudo ]; then
  kdesudo $ELF && exit 0
fi
if [ -e /usr/bin/kdesu ]; then
  kdesu $ELF && exit 0
fi
echo "Could not use kdesudo or kdesu"
$ELF && exit 0 || exit 1