summaryrefslogtreecommitdiff
path: root/tools/hook-network-manager
diff options
context:
space:
mode:
Diffstat (limited to 'tools/hook-network-manager')
-rwxr-xr-xtools/hook-network-manager9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/hook-network-manager b/tools/hook-network-manager
new file mode 100755
index 00000000..447b134e
--- /dev/null
+++ b/tools/hook-network-manager
@@ -0,0 +1,9 @@
+#!/bin/sh
+# This script hooks into NetworkManager(8) via its scripts
+# arguments are 'interface-name' and 'action'
+#
+
+case "$1:$2" in
+ *:up) exec cloud-init dhclient-hook up "$1";;
+ *:down) exec cloud-init dhclient-hook down "$1";;
+esac