diff options
author | Nate House nathan.house@rackspace.com <> | 2014-02-03 16:03:14 -0600 |
---|---|---|
committer | Nate House nathan.house@rackspace.com <> | 2014-02-03 16:03:14 -0600 |
commit | a9e4009ae7221ea167b3e1083a887564483e0350 (patch) | |
tree | a370bd47399b1517c21b89d68aefd5afc15c5418 /sysvinit/freebsd/cloudinit | |
parent | 4a0e460f18d8cbf2651286565efec1f00cbb20cd (diff) | |
parent | 3cfe9b3d8958b1a4e450d5ff31d805c424945027 (diff) | |
download | vyos-cloud-init-a9e4009ae7221ea167b3e1083a887564483e0350.tar.gz vyos-cloud-init-a9e4009ae7221ea167b3e1083a887564483e0350.zip |
Fix merge conflict
Diffstat (limited to 'sysvinit/freebsd/cloudinit')
-rwxr-xr-x | sysvinit/freebsd/cloudinit | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/sysvinit/freebsd/cloudinit b/sysvinit/freebsd/cloudinit new file mode 100755 index 00000000..8d5ff10e --- /dev/null +++ b/sysvinit/freebsd/cloudinit @@ -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" |