diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2008-03-05 02:54:18 +0000 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2008-03-05 02:54:18 +0000 |
commit | a330619672d9a8e91411f4fbe865417ee062d9da (patch) | |
tree | aa840b3edfcddbe4779c123f320e8ac71e60afe9 /Library/asuser | |
parent | dc088e6392ddb5e48e8b35423ca5242d03ecfe91 (diff) |
Added script for execution as a particular user.
Diffstat (limited to 'Library/asuser')
-rwxr-xr-x | Library/asuser | 11 |
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}" "$@" |