From a330619672d9a8e91411f4fbe865417ee062d9da Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 5 Mar 2008 02:54:18 +0000 Subject: Added script for execution as a particular user. --- Library/asuser | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 Library/asuser (limited to 'Library/asuser') 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}" "$@" -- cgit v1.2.3