#!/bin/sh # PROVIDE: cloudinit # REQUIRE: FILESYSTEMS NETWORKING cloudinitlocal # BEFORE: cloudconfig cloudfinal . /etc/rc.subr PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" export CLOUD_CFG=/usr/local/etc/cloud/cloud.cfg name="cloudinit" command="/usr/local/bin/cloud-init" start_cmd="cloudinit_start" stop_cmd=":" rcvar="cloudinit_enable" start_precmd="cloudinit_override" start_cmd="cloudinit_start" cloudinit_override() { # If there exist sysconfig/defaults variable override files use it... if [ -f /etc/defaults/cloud-init ]; then . /etc/defaults/cloud-init fi } cloudinit_start() { echo -n "${command} starting" ${command} init } load_rc_config $name run_rc_command "$1"