]> git.ipfire.org Git - people/stevee/network.git/blobdiff - functions.dhclient
6to4-tunnel: Add documentation.
[people/stevee/network.git] / functions.dhclient
index e20ad149cd4e50284ad590528aa30d586017b72a..d94684a83a50fd5644347ccf9a7b1c7a0493a5f2 100644 (file)
@@ -26,34 +26,41 @@ dhclient_start() {
        assert isset interface
        assert device_exists ${interface}
 
-       local service=$(dhclient_proto2service ${proto})
-       assert isset service
-
-       service_start "${service}@${interface}"
+       local service=$(dhclient_proto2service ${proto} ${interface})
+       service_start ${service}
 }
 
 dhclient_stop() {
        local interface=${1}
        local proto=${2}
 
-       local service=$(dhclient_proto2service ${proto})
-       assert isset service
+       local service=$(dhclient_proto2service ${proto} ${interface})
+       service_stop ${service}
+}
 
-       service_stop "${service}@${interface}"
+dhclient_status() {
+       local interface=${1}
+       local proto=${2}
+
+       local service=$(dhclient_proto2service ${proto} ${interface})
+       service_status ${service}
 }
 
 dhclient_proto2service() {
        local proto=${1}
        assert isset proto
 
+       local interface=${2}
+       assert isset interface
+
        local service
 
        case "${proto}" in
                ipv4)
-                       service="dhclient4"
+                       service="dhclient4@${interface}.service"
                        ;;
                ipv6)
-                       service="dhclient6"
+                       service="dhclient6@${interface}.service"
                        ;;
                *)
                        return ${EXIT_ERROR}