2 # This script is called by "systemctl enable/disable" when the given unit is a
3 # SysV init.d script. It needs to call the distribution's mechanism for
4 # enabling/disabling those, such as chkconfig, update-rc.d, or similar. This
5 # can optionally take a --root argument for enabling a SysV init script
6 # in a chroot or similar.
10 echo "Usage: $0 [--root=path] enable|disable|is-enabled <sysv script name>" >&2
15 eval set -- "$(getopt -o r: --long root: -- "$@")"
27 [ -n "$NAME" ] || usage
31 # call the command to enable SysV init script $NAME here
32 # (consider optional $ROOT)
33 echo "IMPLEMENT ME: enabling SysV init.d script $NAME"
36 # call the command to disable SysV init script $NAME here
37 # (consider optional $ROOT)
38 echo "IMPLEMENT ME: disabling SysV init.d script $NAME"
41 # exit with 0 if $NAME is enabled, non-zero if it is disabled
42 # (consider optional $ROOT)
43 echo "IMPLEMENT ME: checking SysV init.d script $NAME"