diff options
-rw-r--r-- | etc/function | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/etc/function b/etc/function index a0f63c3..1298058 100644 --- a/etc/function +++ b/etc/function @@ -10,15 +10,11 @@ autoload zargs autoload $ZDIR/functions/*(*N:t) function Start Stop Restart Reload { - typeset script - function __sudo { - if ((EUID)) { - sudo $* - } else { - $* - } + typeset script sudo + if ((EUID)) { + sudo=sudo } for script in $*; { - __sudo /etc/init.d/$script ${0:l} + $sudo /etc/init.d/$script ${0:l} } } |