summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-06-02 23:18:23 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-06-02 23:18:23 (EDT)
commit57f175ae5f51376c2657a2b733388eada6296931 (patch)
tree233a5e08ec22d4944dee61e958fbc292bb967d49
parentf57ca38e1627d7228a10093e3e21dcf5b5091354 (diff)
Make most of the /etc/rc.d/ links at install time.
-rwxr-xr-xbuild4
-rwxr-xr-xbusybox.pkg/postinst5
-rw-r--r--scripts16
3 files changed, 17 insertions, 8 deletions
diff --git a/build b/build
index 17deddc..69ad40b 100755
--- a/build
+++ b/build
@@ -44,6 +44,7 @@ install: build
exec 3>&-
set -e; $(config_enabled); $(install_init_script); \
if config_enabled INIT; then \
+ exec 3>dest/usr/share/busybox/init-scripts; \
install -d -m 0755 dest/etc; \
install -p -m 0644 inittab dest/etc/inittab; \
install -d -m 0755 dest/etc/init.d dest/etc/rc.d; \
@@ -53,7 +54,10 @@ install: build
while read -r config script links; do \
config_enabled "$${config}" && \
install_init_script "$${script}" $${links}; \
+ [ "x$${links:+set}" != 'xset' ] && \
+ printf '%s\n' "$${script}" >&3; \
done <../scripts; \
+ exec 3>&-; \
fi; \
if config_enabled HTTPD; then \
install -d -m 0755 dest/var/www; \
diff --git a/busybox.pkg/postinst b/busybox.pkg/postinst
index d74c331..99b8006 100755
--- a/busybox.pkg/postinst
+++ b/busybox.pkg/postinst
@@ -5,6 +5,11 @@ if [ "x${1}" = 'xconfigure' ]; then
update-alternatives --install "${link}" "${name}" \
"${link}.busybox" "${prio}"
done </usr/share/busybox/alternatives
+ if [ -e /usr/share/busybox/init-scripts ]; then
+ while read script; do
+ "/etc/init.d/${script}" enable
+ done </usr/share/busybox/init-scripts
+ fi
if [ -d /etc/network ] && ! [ -f /etc/network/interfaces ]; then
exec 3>/etc/network/interfaces
printf 'auto lo\niface lo inet loopback\n\n' >&3
diff --git a/scripts b/scripts
index 4597c28..042e3d3 100644
--- a/scripts
+++ b/scripts
@@ -1,11 +1,11 @@
HOSTNAME hostname S03
-HTTPD httpd S40 K70
-KLOGD klogd S30 K80
+HTTPD httpd
+KLOGD klogd
MDEV mdev S02 K98
-FEATURE_MOUNT_FSTAB mountall S10
-FEATURE_MOUNT_FLAGS mountdevsubfs S03 K97
+FEATURE_MOUNT_FSTAB mountall
+FEATURE_MOUNT_FLAGS mountdevsubfs
FEATURE_MOUNT_FLAGS mountkernfs S01 K99
-FEATURE_MOUNT_FLAGS mounttmpfs S03 K97
-IFUPDOWN networking S20 K90
-SYSLOGD syslog S30 K80
-TELNETD telnetd S40 K70
+FEATURE_MOUNT_FLAGS mounttmpfs
+IFUPDOWN networking
+SYSLOGD syslog
+TELNETD telnetd