summaryrefslogtreecommitdiff
path: root/Library/asuser
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2008-03-05 02:54:18 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2008-03-05 02:54:18 +0000
commita330619672d9a8e91411f4fbe865417ee062d9da (patch)
treeaa840b3edfcddbe4779c123f320e8ac71e60afe9 /Library/asuser
parentdc088e6392ddb5e48e8b35423ca5242d03ecfe91 (diff)
Added script for execution as a particular user.
Diffstat (limited to 'Library/asuser')
-rwxr-xr-xLibrary/asuser11
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/asuser b/Library/asuser
new file mode 100755
index 0000000..a4285a6
--- /dev/null
+++ b/Library/asuser
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+version=$(sw_vers -productVersion)
+
+if [[ ${version} = 1.0* || ${version} = 1.1.[012] ]]; then
+ user=root
+else
+ user=mobile
+fi
+
+su -c "${user}" "$@"