]> git.ipfire.org Git - people/arne_f/network.git/commitdiff
network: Handle pppd ip-up and ip-down events sober in hook.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 3 Jun 2010 21:28:37 +0000 (23:28 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 3 Jun 2010 21:28:37 +0000 (23:28 +0200)
header-zone
ppp/ip-updown

index 30cb5f277aabd75aa5c55792b83ad7bf6206089f..3ece84863d0e1b776be9d49c16058db50cffe64c 100644 (file)
@@ -223,6 +223,19 @@ function _config_show() {
        _notimplemented _config_show
 }
 
        _notimplemented _config_show
 }
 
+# These tree functions exit silently
+function _ppp-ip-pre-up() {
+       exit ${EXIT_OK}
+}
+
+function _ppp-ip-up() {
+       exit ${EXIT_OK}
+}
+
+function _ppp-ip-down() {
+       exit ${EXIT_OK}
+}
+
 function run() {
        case "${action}" in
                create|discover|down|edit|info|rem|status|up)
 function run() {
        case "${action}" in
                create|discover|down|edit|info|rem|status|up)
@@ -247,6 +260,10 @@ function run() {
                        _config $@
                        ;;
 
                        _config $@
                        ;;
 
+               ppp-ip-pre-up|ppp-ip-up|ppp-ip-down)
+                       _${action} $@
+                       ;;
+
        esac
 
        error "Hook did not exit properly."
        esac
 
        error "Hook did not exit properly."
index b5bf989bc4c26a4853e119db8c6d42b2c0dd53ae..d03e9321668dc396553cb80be54df73359ea76e5 100755 (executable)
@@ -39,4 +39,4 @@ if ! hook_exists ${HOOK}; then
        exit ${EXIT_ERROR}
 fi
 
        exit ${EXIT_ERROR}
 fi
 
-hook_exec ${HOOK} $(basename ${0}) ${ZONE}
+hook_exec ${HOOK} ppp-$(basename ${0}) ${ZONE}