summaryrefslogtreecommitdiff
path: root/sysvinit/gentoo/cloud-init
blob: 7f88237e2050818f30e8970c5f85689e68fa7fb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/sbin/openrc-run
# add depends for network, dns, fs etc
depend() {
  after cloud-init-local
  after net
  before cloud-config
  provide cloud-init
}

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
    cloud-init init
  fi
  eend 0
}