Mercurial > vanilla
changeset 569:290ca0287e5d
core/rc: make busybox init start /etc/rc.start
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sat, 06 Jul 2019 16:49:51 +0200 |
parents | 129802e3c692 |
children | 3ef1ae5d014a |
files | core/rc/rc.init |
diffstat | 1 files changed, 21 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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