Browse Source

- add rc.local support

master
vanhofen 4 years ago
parent
commit
271f13d47b
  1. 6
      make/target-scripts.mk
  2. 14
      skel-root/general/files-etc/rc.local
  3. 12
      skel-root/general/scripts/rc.local.init

6
make/target-scripts.mk

@ -22,6 +22,7 @@ init-scripts: \
$(TARGET_sysconfdir)/init.d/networking \
$(TARGET_sysconfdir)/init.d/partitions-by-name \
$(TARGET_sysconfdir)/init.d/proc \
$(TARGET_sysconfdir)/init.d/rc.local \
$(TARGET_sysconfdir)/init.d/resizerootfs \
$(TARGET_sysconfdir)/init.d/swap \
$(TARGET_sysconfdir)/init.d/sys_update.sh \
@ -106,6 +107,11 @@ ifeq ($(BOXMODEL),$(filter $(BOXMODEL),hd51 bre2ze4k h7 hd60 hd61 vusolo4k vuduo
$(UPDATE-RC.D) $(@F) start 90 S .
endif
$(TARGET_sysconfdir)/init.d/rc.local:
$(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/rc.local.init $(@)
$(UPDATE-RC.D) $(@F) start 99 2 3 4 5 .
$(INSTALL_EXEC) -D $(TARGET_FILES)/files-etc/rc.local $(TARGET_sysconfdir)/rc.local
$(TARGET_sysconfdir)/init.d/resizerootfs:
ifeq ($(BOXMODEL),$(filter $(BOXMODEL),hd51 bre2ze4k h7 hd60 hd61))
$(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/resizerootfs.init $(@)

14
skel-root/general/files-etc/rc.local

@ -0,0 +1,14 @@
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
exit 0

12
skel-root/general/scripts/rc.local.init

@ -0,0 +1,12 @@
#!/bin/sh
. /etc/init.d/globals
case $1 in
start)
/etc/rc.local
;;
*)
echo "[${BASENAME}] Usage: $0 {start}"
;;
esac
Loading…
Cancel
Save