summaryrefslogtreecommitdiff
path: root/sysvinit/freebsd/cloudinit
diff options
context:
space:
mode:
Diffstat (limited to 'sysvinit/freebsd/cloudinit')
-rwxr-xr-xsysvinit/freebsd/cloudinit10
1 files changed, 8 insertions, 2 deletions
diff --git a/sysvinit/freebsd/cloudinit b/sysvinit/freebsd/cloudinit
index 679adf5d..2e5a82b2 100755
--- a/sysvinit/freebsd/cloudinit
+++ b/sysvinit/freebsd/cloudinit
@@ -17,8 +17,14 @@ start_cmd="cloudinit_start"
cloudinit_start()
{
- echo -n "${command} starting"
- ${command} init
+ echo -n "${command} starting"
+ if kenv -q kernel_options | grep -q 'cloud-init=disabled'; then
+ warn "cloud-init is disabled via kernel_options."
+ elif test -e /etc/cloud/cloud-init.disabled; then
+ warn "cloud-init is disabled via cloud-init.disabled file."
+ else
+ ${command} init
+ fi
}
load_rc_config 'cloudinit'