summaryrefslogtreecommitdiff
path: root/sysvinit/freebsd
diff options
context:
space:
mode:
Diffstat (limited to 'sysvinit/freebsd')
-rwxr-xr-xsysvinit/freebsd/cloudconfig10
-rwxr-xr-xsysvinit/freebsd/cloudfinal8
-rwxr-xr-xsysvinit/freebsd/cloudinit10
-rwxr-xr-xsysvinit/freebsd/cloudinitlocal10
4 files changed, 31 insertions, 7 deletions
diff --git a/sysvinit/freebsd/cloudconfig b/sysvinit/freebsd/cloudconfig
index 13c47280..bb4ec979 100755
--- a/sysvinit/freebsd/cloudconfig
+++ b/sysvinit/freebsd/cloudconfig
@@ -17,8 +17,14 @@ start_cmd="cloudconfig_start"
cloudconfig_start()
{
- echo "${command} starting"
- ${command} modules --mode config
+ echo "${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} modules --mode config
+ fi
}
load_rc_config 'cloudinit'
diff --git a/sysvinit/freebsd/cloudfinal b/sysvinit/freebsd/cloudfinal
index 76a584ec..0a61c11d 100755
--- a/sysvinit/freebsd/cloudfinal
+++ b/sysvinit/freebsd/cloudfinal
@@ -18,7 +18,13 @@ start_cmd="cloudfinal_start"
cloudfinal_start()
{
echo -n "${command} starting"
- ${command} modules --mode final
+ 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} modules --mode final
+ fi
}
load_rc_config 'cloudinit'
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'
diff --git a/sysvinit/freebsd/cloudinitlocal b/sysvinit/freebsd/cloudinitlocal
index d6c3579e..87d8ee16 100755
--- a/sysvinit/freebsd/cloudinitlocal
+++ b/sysvinit/freebsd/cloudinitlocal
@@ -17,8 +17,14 @@ start_cmd="cloudlocal_start"
cloudlocal_start()
{
- echo -n "${command} starting"
- ${command} init --local
+ 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 --local
+ fi
}
load_rc_config 'cloudinit'