diff options
author | P. 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) |
commit | 57f175ae5f51376c2657a2b733388eada6296931 (patch) | |
tree | 233a5e08ec22d4944dee61e958fbc292bb967d49 | |
parent | f57ca38e1627d7228a10093e3e21dcf5b5091354 (diff) |
Make most of the /etc/rc.d/ links at install time.
-rwxr-xr-x | build | 4 | ||||
-rwxr-xr-x | busybox.pkg/postinst | 5 | ||||
-rw-r--r-- | scripts | 16 |
3 files changed, 17 insertions, 8 deletions
@@ -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 @@ -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 |