From a6e4abcb9687b579dddaa4ba4b08d4e5124a8101 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 10 Oct 2011 15:26:11 +0200 Subject: [PATCH] make it easier to use netifd-proto.sh as a library --- dummy/netifd-proto.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dummy/netifd-proto.sh b/dummy/netifd-proto.sh index 104edc7..2fbfd4e 100755 --- a/dummy/netifd-proto.sh +++ b/dummy/netifd-proto.sh @@ -38,9 +38,6 @@ _proto_do_setup() { proto="$1"; shift cmd="$1"; shift -interface="$1"; shift -data="$1"; shift -ifname="$1"; shift case "$cmd" in dump) @@ -61,7 +58,11 @@ case "$cmd" in json_dump } ;; - *) + setup|teardown) + interface="$1"; shift + data="$1"; shift + ifname="$1"; shift + add_protocol() { [[ "$proto" == "$1" ]] || return 0 -- 2.25.1