#!/bin/sh # PROVIDE: cloudfinal # REQUIRE: LOGIN cloudinit cloudconfig cloudinitlocal # REQUIRE: cron mail sshd swaplate . /etc/rc.subr name="cloudfinal" command="/usr/local/bin/cloud-init" start_cmd="cloudfinal_start" stop_cmd=":" rcvar="cloudinit_enable" start_precmd="cloudinit_override" start_cmd="cloudfinal_start" : ${cloudinit_config:="/usr/local/etc/cloud/cloud.cfg"} cloudinit_override() { # If there exist sysconfig/defaults variable override files use it... if [ -f /etc/defaults/cloud-init ]; then . /etc/defaults/cloud-init fi } cloudfinal_start() { echo -n "${command} starting" ${command} -f ${cloudinit_config} modules --mode final } load_rc_config $name run_rc_command "$1"