sysvinit, etc.), openrc or for the systemd units. These commands
will be run only when the relevant init system is installed (i.e.
if systemd is selected as the init system in the configuration,
- only +LIBFOO_INSTALL_INIT_SYSTEMD+ will be run).
+ only +LIBFOO_INSTALL_INIT_SYSTEMD+ will be run). The only exception
+ is when openrc is chosen as init system and +LIBFOO_INSTALL_INIT_OPENRC+
+ has not been set, in such situation +LIBFOO_INSTALL_INIT_SYSV+ will
+ be called, since openrc supports sysv init scripts.
* +LIBFOO_HELP_CMDS+ lists the actions to print the package help, which
is included to the main +make help+ output. These commands can print
--- /dev/null
+#!/sbin/openrc-run
+
+description="start or stop sysv rc[S,K] scripts"
+
+depend() {
+ after local
+}
+
+start() {
+ einfo "Starting sysv rc scripts"
+ for i in /etc/init.d/S??*; do
+ # Ignore dangling symlinks (if any).
+ [ -e "$i" ] || continue
+ $i start
+ done
+}
+
+stop() {
+ einfo "Stopping sysv rc scripts"
+ for i in $(ls -r /etc/init.d/S??*); do
+ # Ignore dangling symlinks (if any).
+ [ -e "$i" ] || continue
+ $i stop
+ done
+}
$(if $(BR2_INIT_SYSV)$(BR2_INIT_BUSYBOX),\
$($(PKG)_INSTALL_INIT_SYSV))
$(if $(BR2_INIT_OPENRC), \
- $($(PKG)_INSTALL_INIT_OPENRC))
+ $(or $($(PKG)_INSTALL_INIT_OPENRC), \
+ $($(PKG)_INSTALL_INIT_SYSV)))
$(foreach hook,$($(PKG)_POST_INSTALL_TARGET_HOOKS),$(call $(hook))$(sep))
$(Q)if test -n "$($(PKG)_CONFIG_SCRIPTS)" ; then \
$(RM) -f $(addprefix $(TARGET_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ; \
--- /dev/null
+/etc/init.d/sysv-rcs
\ No newline at end of file