1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
#!/sbin/openrc-run
description="cloud-init hotplug daemon"
command="/usr/libexec/cloud-init/cloud-init-hotplugd"
pidfile="/run/$RC_SVCNAME.pid"
depend() {
after cloud-final
}
start() {
if grep -q 'cloud-init=disabled' /proc/cmdline; then
ewarn "$RC_SVCNAME is disabled via /proc/cmdline."
elif test -e /etc/cloud/cloud-init.disabled; then
ewarn "$RC_SVCNAME is disabled via cloud-init.disabled file"
else
ebegin "$description"
start-stop-daemon --start --background --exec $command \
--make-pidfile --pidfile $pidfile
eend $?
fi
}
|