aboutsummaryrefslogtreecommitdiff
path: root/libexec/rc/rc.d
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/rc/rc.d')
-rw-r--r--libexec/rc/rc.d/Makefile1
-rwxr-xr-xlibexec/rc/rc.d/nuageinit_post_net25
2 files changed, 26 insertions, 0 deletions
diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile
index 23a3426e5d0a..ef2e7b43f9ed 100644
--- a/libexec/rc/rc.d/Makefile
+++ b/libexec/rc/rc.d/Makefile
@@ -317,6 +317,7 @@ SMRCDPACKAGE= sendmail
.if ${MK_NUAGEINIT} != "no"
CONFGROUPS+= NIUAGEINIT
NIUAGEINIT= nuageinit \
+ nuageinit_post_net \
nuageinit_user_data_script
NIUAGEINITPACKAGE= nuageinit
.endif
diff --git a/libexec/rc/rc.d/nuageinit_post_net b/libexec/rc/rc.d/nuageinit_post_net
new file mode 100755
index 000000000000..bea4c5e37c5f
--- /dev/null
+++ b/libexec/rc/rc.d/nuageinit_post_net
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+
+# PROVIDE: nuageinit_post_net
+# REQUIRE: NETWORKING devfs
+# BEFORE: SERVERS
+# KEYWORD: firstboot
+
+. /etc/rc.subr
+
+name="nuageinit_post_net"
+desc="Post Network Cloud Init configuration"
+start_cmd="execute_post_net"
+stop_cmd=":"
+rcvar="nuageinit_enable"
+
+execute_post_net()
+{
+ test -f /var/cache/nuageinit/post_network_config || return
+ /usr/libexec/nuageinit /var/cache/nuageinit/post_network_config | tee -a /var/log/nuageinit.log
+}
+
+# Share the same config as nuageinit
+load_rc_config nuageinit
+run_rc_command "$1"