summaryrefslogtreecommitdiff
path: root/sysvinit/freebsd/cloudinitlocal
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2014-09-02 12:26:26 -0400
committerScott Moser <smoser@ubuntu.com>2014-09-02 12:26:26 -0400
commit128fd80cb0b27430def29bee7a8c473facd84be8 (patch)
treed457ca5dab90fc33b429ca82c0f2a38ae18a998d /sysvinit/freebsd/cloudinitlocal
parente39abc783f7edd6435dbc7ea1fc3d02e6b3955d3 (diff)
parentcc77628e1ee3cd03d1ec2e17f1d744c8f4b0938b (diff)
downloadvyos-cloud-init-128fd80cb0b27430def29bee7a8c473facd84be8.tar.gz
vyos-cloud-init-128fd80cb0b27430def29bee7a8c473facd84be8.zip
FreeBsd: fix initscripts and add working config file
This set of changes generally produces a functional cloud-init on FreeBsd.
Diffstat (limited to 'sysvinit/freebsd/cloudinitlocal')
-rwxr-xr-xsysvinit/freebsd/cloudinitlocal14
1 files changed, 7 insertions, 7 deletions
diff --git a/sysvinit/freebsd/cloudinitlocal b/sysvinit/freebsd/cloudinitlocal
index b55705c0..c340d5d0 100755
--- a/sysvinit/freebsd/cloudinitlocal
+++ b/sysvinit/freebsd/cloudinitlocal
@@ -6,28 +6,28 @@
. /etc/rc.subr
+export CLOUD_CFG=/usr/local/etc/cloud/cloud.cfg
+
name="cloudinitlocal"
-command="/usr/bin/cloud-init"
+command="/usr/local/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
+ # If there exist sysconfig/defaults variable override files use it...
+ if [ -f /etc/defaults/cloud-init ]; then
+ . /etc/defaults/cloud-init
fi
}
cloudlocal_start()
{
echo -n "${command} starting"
- ${command} ${cloudinit_config} init --local
+ ${command} init --local
}
load_rc_config $name