summaryrefslogtreecommitdiffstats
path: root/extra/ktsuss/gksu
diff options
context:
space:
mode:
authorThierry N <thierryn1 at hispeed dot ch>2009-08-10 23:27:19 +0200
committerThierry N <thierryn1 at hispeed dot ch>2009-08-10 23:27:19 +0200
commitb64b0cae1bd42e73d791ad01f0a556bbb5bcb2c4 (patch)
treebb11021d3995916c351c9c40ffa45cc75b16ab5b /extra/ktsuss/gksu
parent203c5b192c45ee4222aaab4d12e6846b2c001a2a (diff)
downloadnutyx-extra-b64b0cae1bd42e73d791ad01f0a556bbb5bcb2c4.tar.gz
nutyx-extra-b64b0cae1bd42e73d791ad01f0a556bbb5bcb2c4.tar.bz2
nutyx-extra-b64b0cae1bd42e73d791ad01f0a556bbb5bcb2c4.tar.xz
nutyx-extra-b64b0cae1bd42e73d791ad01f0a556bbb5bcb2c4.zip
Ajout de ktsuss#1.4-3
Diffstat (limited to 'extra/ktsuss/gksu')
-rw-r--r--extra/ktsuss/gksu11
1 files changed, 11 insertions, 0 deletions
diff --git a/extra/ktsuss/gksu b/extra/ktsuss/gksu
new file mode 100644
index 000000000..e905e2589
--- /dev/null
+++ b/extra/ktsuss/gksu
@@ -0,0 +1,11 @@
+#!/bin/bash
+COMMAND="$(echo "${@}" | tr -d "\'\"\\")"
+BIN="$(echo "${1}" | cut -d" " -f1)"
+KTSUSS="/usr/libexec/ktsuss -u root"
+export PATH="${PATH}:/sbin:/usr/sbin"
+[ "$(id -u)" = "0" ] && KTSUSS=""
+[ -x "${BIN}" ] && exec ${KTSUSS} ${COMMAND}
+for path in $(echo ${PATH} | sed -e 's/:/ /g') ; do
+ [ -x "${path}/${BIN}" ] && exec ${KTSUSS} ${path}/${COMMAND}
+done
+