summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-11-09 22:01:08 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2008-11-09 22:01:58 +0100
commitff0e5cf27e08a1dab2e79708704d52fb4f86f777 (patch)
treea56de07775db6101dfb808f06114a5ec6af9761f /etc
parentdef54e82a10697dda633772b874724bd1fb600b8 (diff)
start/stop/... functions: Allow multiple arguments
Diffstat (limited to 'etc')
-rw-r--r--etc/function8
1 files changed, 7 insertions, 1 deletions
diff --git a/etc/function b/etc/function
index ecd9ea4..19e5ebd 100644
--- a/etc/function
+++ b/etc/function
@@ -16,5 +16,11 @@ chpwd
# from https://git.tabularazor.org/~mikael/etc/tree/zsh/functions
for action in Start Stop Restart Reload; {
- eval "$action() { sudo /etc/init.d/\$1 ${action:l} ; }"
+ eval "function $action {
+ typeset action
+ for action in \$*; {
+ sudo /etc/init.d/\$action ${action:l}
+ }
+ }"
}
+unset action