File: cloud-init-hotplug

package info (click to toggle)
cloud-init 25.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,412 kB
  • sloc: python: 135,894; sh: 3,883; makefile: 141; javascript: 30; xml: 22
file content (23 lines) | stat: -rwxr-xr-x 571 bytes parent folder | download
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
}