# HG changeset patch # User David Demelier # Date 1562424591 -7200 # Node ID 290ca0287e5d465ed933856da681621faaaa69b7 # Parent 129802e3c6920fd5c1c53b27a4a882709a9fbfef core/rc: make busybox init start /etc/rc.start diff -r 129802e3c692 -r 290ca0287e5d core/rc/rc.init --- a/core/rc/rc.init Fri Jul 05 21:47:24 2019 +0200 +++ b/core/rc/rc.init Sat Jul 06 16:49:51 2019 +0200 @@ -31,7 +31,7 @@ fi if [ -x /bin/sysctl ]; then - echo "Setting kernel parameters." + echo "Setting kernel parameters" /bin/sysctl -p >/dev/null 2>&1 fi @@ -105,14 +105,14 @@ /bin/ldconfig fi -if [ -n "$TIMEZONE" ]; then +if [ -n "$TIMEZONE" ] && [ "$TIMEZONE" != "UTC" ]; then echo -n "Setting timezone: " if [ -f /share/zoneinfo/$TIMEZONE ]; then /bin/ln -sf /share/zoneinfo/$TIMEZONE /etc/localtime echo "$TIMEZONE." else - echo "$TIMEZONE not found." + echo "$TIMEZONE not found" fi fi @@ -129,3 +129,21 @@ # Cleanup some files. rm -f /etc/forcefsck + +# +# When running Vanilla busybox's init which has no inittab support, run +# /etc/rc.start to bring up user defined services. Since runlevels are also +# unsupported, we specify the maximum number which is 5. +# +# sysvinit defines INIT_VERSION environment variable which is not present in +# busybox init. +# +if [ -z "$INIT_VERSION" ]; then + if [ -x /etc/rc.start ]; then + /etc/rc.start 5 + fi + + if [ -x /etc/rc.local ]; then + /etc/rc.local + fi +fi