Mercurial > vanilla
comparison core/rc/rc.init @ 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 | ddb052f876cd |
children | 3c0d8d9fe11e |
comparison
equal
deleted
inserted
replaced
568:129802e3c692 | 569:290ca0287e5d |
---|---|
29 echo "Setting hostname: $HOSTNAME" | 29 echo "Setting hostname: $HOSTNAME" |
30 /bin/hostname "$HOSTNAME" | 30 /bin/hostname "$HOSTNAME" |
31 fi | 31 fi |
32 | 32 |
33 if [ -x /bin/sysctl ]; then | 33 if [ -x /bin/sysctl ]; then |
34 echo "Setting kernel parameters." | 34 echo "Setting kernel parameters" |
35 /bin/sysctl -p >/dev/null 2>&1 | 35 /bin/sysctl -p >/dev/null 2>&1 |
36 fi | 36 fi |
37 | 37 |
38 if [ -x /bin/mountpoint ]; then | 38 if [ -x /bin/mountpoint ]; then |
39 echo -n "Mounting filesystems: " | 39 echo -n "Mounting filesystems: " |
103 # Update shared library caches. | 103 # Update shared library caches. |
104 if [ -x /bin/ldconfig ]; then | 104 if [ -x /bin/ldconfig ]; then |
105 /bin/ldconfig | 105 /bin/ldconfig |
106 fi | 106 fi |
107 | 107 |
108 if [ -n "$TIMEZONE" ]; then | 108 if [ -n "$TIMEZONE" ] && [ "$TIMEZONE" != "UTC" ]; then |
109 echo -n "Setting timezone: " | 109 echo -n "Setting timezone: " |
110 | 110 |
111 if [ -f /share/zoneinfo/$TIMEZONE ]; then | 111 if [ -f /share/zoneinfo/$TIMEZONE ]; then |
112 /bin/ln -sf /share/zoneinfo/$TIMEZONE /etc/localtime | 112 /bin/ln -sf /share/zoneinfo/$TIMEZONE /etc/localtime |
113 echo "$TIMEZONE." | 113 echo "$TIMEZONE." |
114 else | 114 else |
115 echo "$TIMEZONE not found." | 115 echo "$TIMEZONE not found" |
116 fi | 116 fi |
117 fi | 117 fi |
118 | 118 |
119 # Console font and keymap. | 119 # Console font and keymap. |
120 if [ -n "$FONT" ] && [ -x /bin/setfont ]; then | 120 if [ -n "$FONT" ] && [ -x /bin/setfont ]; then |
127 /bin/loadkeys $KEYMAP | 127 /bin/loadkeys $KEYMAP |
128 fi | 128 fi |
129 | 129 |
130 # Cleanup some files. | 130 # Cleanup some files. |
131 rm -f /etc/forcefsck | 131 rm -f /etc/forcefsck |
132 | |
133 # | |
134 # When running Vanilla busybox's init which has no inittab support, run | |
135 # /etc/rc.start to bring up user defined services. Since runlevels are also | |
136 # unsupported, we specify the maximum number which is 5. | |
137 # | |
138 # sysvinit defines INIT_VERSION environment variable which is not present in | |
139 # busybox init. | |
140 # | |
141 if [ -z "$INIT_VERSION" ]; then | |
142 if [ -x /etc/rc.start ]; then | |
143 /etc/rc.start 5 | |
144 fi | |
145 | |
146 if [ -x /etc/rc.local ]; then | |
147 /etc/rc.local | |
148 fi | |
149 fi |