← Back to team overview

cloud-init-dev team mailing list archive

[Merge] lp:~harlowja/cloud-init/freebsd-rc.d into lp:cloud-init

 

Joshua Harlow has proposed merging lp:~harlowja/cloud-init/freebsd-rc.d into lp:cloud-init.

Requested reviews:
  cloud init development team (cloud-init-dev)

For more details, see:
https://code.launchpad.net/~harlowja/cloud-init/freebsd-rc.d/+merge/202155
-- 
https://code.launchpad.net/~harlowja/cloud-init/freebsd-rc.d/+merge/202155
Your team cloud init development team is requested to review the proposed merge of lp:~harlowja/cloud-init/freebsd-rc.d into lp:cloud-init.
=== added directory 'sysvinit/freebsd'
=== added file 'sysvinit/freebsd/cloudconfig'
--- sysvinit/freebsd/cloudconfig	1970-01-01 00:00:00 +0000
+++ sysvinit/freebsd/cloudconfig	2014-01-17 18:41:34 +0000
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# PROVIDE: cloudconfig
+# REQUIRE: cloudinit cloudinitlocal
+# BEFORE:  cloudfinal
+
+. /etc/rc.subr
+
+name="cloudconfig"
+command="/usr/bin/cloud-init"
+start_cmd="cloudconfig_start"
+stop_cmd=":"
+rcvar="cloudinit_enable"
+start_precmd="cloudinit_override"
+start_cmd="cloudconfig_start"
+
+: ${cloudinit_config}:="/etc/cloud/cloud.cfg"}
+
+
+cloudinit_override()
+{
+	# If there exist sysconfig/default variable override files use it...
+	if [ -f /etc/default/cloud-init ]; then
+		. /etc/default/cloud-init
+	fi
+}
+
+cloudconfig_start() {
+	echo "${command} starting"
+	${command} ${cloudinit_config} modules --mode config
+}
+
+load_rc_config $name
+run_rc_command "$1"

=== added file 'sysvinit/freebsd/cloudfinal'
--- sysvinit/freebsd/cloudfinal	1970-01-01 00:00:00 +0000
+++ sysvinit/freebsd/cloudfinal	2014-01-17 18:41:34 +0000
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# PROVIDE: cloudfinal
+# REQUIRE: LOGIN cloudinit cloudconfig cloudinitlocal
+# REQUIRE: cron mail sshd swaplate
+
+
+. /etc/rc.subr
+
+name="cloudfinal"
+command="/usr/bin/cloud_init"
+start_cmd="cloudfinal_start"
+stop_cmd=":"
+rcvar="cloudinit_enable"
+start_precmd="cloudinit_override"
+start_cmd="cloudfinal_start"
+
+: ${cloud-init_config}:="/etc/cloud/cloud.cfg"}
+
+
+cloudinit_override()
+{
+	# If there exist sysconfig/default variable override files use it...
+	if [ -f /etc/default/cloud-init ]; then
+		 . /etc/default/cloud-init
+	fi
+}
+
+cloudfinal_start() {
+	echo -n "${command} starting"
+	${command} ${cloudinit_config} modules --mode final
+}
+
+load_rc_config $name
+run_rc_command "$1"

=== added file 'sysvinit/freebsd/cloudinit'
--- sysvinit/freebsd/cloudinit	1970-01-01 00:00:00 +0000
+++ sysvinit/freebsd/cloudinit	2014-01-17 18:41:34 +0000
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# PROVIDE: cloudinit
+# REQUIRE: FILESYSTEMS NETWORKING cloudinitlocal
+# BEFORE:  cloudconfig cloudfinal
+
+. /etc/rc.subr
+
+name="cloudinit"
+command="/usr/bin/cloud_init"
+start_cmd="cloudinit_start"
+stop_cmd=":"
+rcvar="cloudinit_enable"
+start_precmd="cloudinit_override"
+start_cmd="cloudinit_start"
+
+: ${cloudinit_config}:="/etc/cloud/cloud.cfg"}
+
+
+cloudinit_override()
+{
+	# If there exist sysconfig/default variable override files use it...
+	if [ -f /etc/default/cloud-init ]; then
+		. /etc/default/cloud-init
+	fi
+}
+
+cloudinit_start() {
+	echo -n "${command} starting"
+	${command} ${cloudinit_config} init
+}
+
+load_rc_config $name
+run_rc_command "$1"

=== added file 'sysvinit/freebsd/cloudinitlocal'
--- sysvinit/freebsd/cloudinitlocal	1970-01-01 00:00:00 +0000
+++ sysvinit/freebsd/cloudinitlocal	2014-01-17 18:41:34 +0000
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# PROVIDE: cloudinitlocal
+# REQUIRE: mountcritlocal 
+# BEFORE:  NETWORKING FILESYSTEMS cloudinit cloudconfig cloudfinal
+
+. /etc/rc.subr
+
+name="cloudinitlocal"
+command="/usr/bin/cloud-init"
+start_cmd="cloudlocal_start"
+stop_cmd=":"
+rcvar="cloudinit_enable"
+start_precmd="cloudinit_override"
+start_cmd="cloudlocal_start"
+
+: ${cloudinit_config}:="/etc/cloud/cloud.cfg"}
+
+
+cloudinit_override()
+{
+	# If there exist sysconfig/default variable override files use it...
+	if [ -f /etc/default/cloud-init ]; then
+		. /etc/default/cloud-init
+	fi
+}
+
+cloudlocal_start() {
+	echo -n "${command} starting"
+	${command} ${cloudinit_config} init --local
+}
+
+load_rc_config $name
+run_rc_command "$1"


Follow ups