Browse Source

- sysvinit: fixes for e4hdultra

master
vanhofen 2 years ago
parent
commit
1810699d59
  1. 101
      package/sysvinit/files/rcS-hd5x-e4hdultra
  2. 16
      package/sysvinit/sysvinit.mk

101
package/sysvinit/files/rcS-hd5x-e4hdultra

@ -0,0 +1,101 @@
#!/bin/sh
runlevel=S
prevlevel=N
umask 022
export runlevel prevlevel
# source defaults
. /etc/default/rcS
. /etc/profile
. /etc/init.d/functions
. /etc/init.d/globals
SHOWINFO "start"
mount -t proc proc /proc
# init system
SHOWINFO "creating and mounting system directories ..."
mount -t devtmpfs devtmpfs /dev
mount -t sysfs sys /sys
mount -t tmpfs tmp /tmp
mount -t tmpfs run /var/run
mount -t tmpfs media /media
mount -t tmpfs srv /srv
mount -t tmpfs mnt /mnt
for dir in autofs epg logos logos/events movies music pictures plugins; do
mkdir -p /mnt/${dir}
done
mkdir -p /dev/pts
mount -t devpts devpts /dev/pts
mkdir -p /dev/shm/usb
service partitions-by-name start
service resizerootfs start
# for nfsd
mkdir -p /var/lib/nfs
mount -t tmpfs nfs /var/lib/nfs
# for samba
mkdir -p /var/samba
mount -t tmpfs samba /var/samba
# for wget
mkdir -p /var/run/wget
# for wireless drivers
mkdir -p /var/run/wpa_supplicant
# set level of messages printed to console
dmesg -n 1
# set dummy date
test -e /etc/date-dummy && date -s "$(cat /etc/date-dummy)"
# automatic restore
if [ -e /var/backup_flash.tar.gz ]; then
/usr/bin/restore_flash.sh
fi
# update system
if [ -x /etc/init.d/sys_update.sh ]; then
/etc/init.d/sys_update.sh
fi
# set hostname
service hostname start
# logging as much as possible
service syslogd start
service sysctl start
# load modules / create nodes
load_module extra/%(BOXMODEL)_1.ko
load_module extra/%(BOXMODEL)_2.ko
load_module extra/%(BOXMODEL)_3.ko
load_module extra/%(BOXMODEL)_4.ko
# show bootlogo
showiframe.sh bootlogo.m2v
# mdev coldplug for node permissions
service mdev start
# fire up network/wlan
service network start
service ntpdate start
# say hi to everyone
display_msg "Booting... NI"
# trap CTRL-C only in this shell so we can interrupt subprocesses
trap ":" INT QUIT TSTP
# call all parts in order
exec /etc/init.d/rc S
SHOWINFO "done"

16
package/sysvinit/sysvinit.mk

@ -24,18 +24,32 @@ ifeq ($(BOXMODEL),$(filter $(BOXMODEL),vusolo4k vuduo4k vuduo4kse vuultimo4k vuz
define SYSVINIT_INSTALL_RCS
$(INSTALL_EXEC) -D $(PKG_FILES_DIR)/rcS-vuplus $(TARGET_sysconfdir)/init.d/rcS
endef
else ifeq ($(BOXMODEL),$(filter $(BOXMODEL),e4hdultra))
define SYSVINIT_INSTALL_RCS
$(INSTALL_EXEC) -D $(PKG_FILES_DIR)/rcS-$(BOXSERIES)-e4hdultra $(TARGET_sysconfdir)/init.d/rcS
endef
else
define SYSVINIT_INSTALL_RCS
$(INSTALL_EXEC) -D $(PKG_FILES_DIR)/rcS-$(BOXSERIES) $(TARGET_sysconfdir)/init.d/rcS
endef
endif
ifeq ($(BOXMODEL),$(filter $(BOXMODEL),e4hdultra))
define SYSVINIT_MODIFY_RCS
$(SED) "s|%(BOXMODEL)|e4hd|g" $(TARGET_sysconfdir)/init.d/rcS
endef
else
define SYSVINIT_MODIFY_RCS
$(SED) "s|%(BOXMODEL)|$(BOXMODEL)|g" $(TARGET_sysconfdir)/init.d/rcS
endef
endif
define SYSVINIT_INSTALL_FILES
$(INSTALL_DATA) -D $(PKG_FILES_DIR)/inittab $(TARGET_sysconfdir)/inittab
$(INSTALL_DATA) -D $(PKG_FILES_DIR)/default-rcS $(TARGET_sysconfdir)/default/rcS
$(INSTALL_EXEC) -D $(PKG_FILES_DIR)/rc $(TARGET_sysconfdir)/init.d/rc
$(SYSVINIT_INSTALL_RCS)
$(SED) "s|%(BOXMODEL)|$(BOXMODEL)|g" $(TARGET_sysconfdir)/init.d/rcS
$(SYSVINIT_MODIFY_RCS)
$(INSTALL_EXEC) -D $(PKG_FILES_DIR)/rcK $(TARGET_sysconfdir)/init.d/rcK
$(INSTALL_EXEC) -D $(PKG_FILES_DIR)/service $(TARGET_sbindir)/service
$(INSTALL_EXEC) -D support/scripts/update-rc.d $(TARGET_sbindir)/update-rc.d

Loading…
Cancel
Save