]> git.ipfire.org Git - people/stevee/network.git/blobdiff - src/hooks/configs/ipv4-static
Remove the function keyword which is a bashism
[people/stevee/network.git] / src / hooks / configs / ipv4-static
index 50eda81536651564cc657b5fe27c48777f31f512..f8a21b83dac299c31673907c28c2f31554608945 100644 (file)
@@ -25,7 +25,7 @@ HOOK_MANPAGE="network-config-ipv4-static"
 
 HOOK_SETTINGS="HOOK ADDRESS PREFIX GATEWAY"
 
-function hook_check() {
+hook_check() {
        assert isset ADDRESS
        assert isinteger PREFIX
 
@@ -35,7 +35,7 @@ function hook_check() {
        fi
 }
 
-function hook_create() {
+hook_create() {
        local zone="${1}"
        assert zone_exists "${zone}"
        shift
@@ -112,7 +112,7 @@ function hook_create() {
        exit ${EXIT_OK}
 }
 
-function hook_up() {
+hook_up() {
        local zone=${1}
        local config=${2}
        shift 2
@@ -138,7 +138,7 @@ function hook_up() {
        exit ${EXIT_OK}
 }
 
-function hook_down() {
+hook_down() {
        local zone=${1}
        local config=${2}
        shift 2
@@ -158,9 +158,13 @@ function hook_down() {
        exit ${EXIT_OK}
 }
 
-function hook_status() {
-       local zone=${1}
-       local config=${2}
+hook_status() {
+       local zone="${1}"
+       assert isset zone
+
+       local config="${2}"
+       assert isset config
+
        shift 2
 
        if ! device_exists ${zone}; then