summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-06-04 23:08:41 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-06-04 23:08:41 (EDT)
commit9de16d22b0ac3cbb74793faa913db889d8151ee5 (patch)
tree0f6ed6fe2701368c036c0da9e72be362963d68b6 /build
parent79d474a5fdc0ea8b9e05f5b68567dbbe9086e4ca (diff)
parentb98d2d2ad1e341a6493fcd5531d605e8427665ca (diff)
Merge branch 'feature/init-system-improvements'.
Diffstat (limited to 'build')
-rwxr-xr-xbuild6
1 files changed, 6 insertions, 0 deletions
diff --git a/build b/build
index 17deddc..6962d5f 100755
--- a/build
+++ b/build
@@ -5,6 +5,7 @@ include ../source.mk
config_enabled = \
config_enabled() \
{ \
+ [ "x$${1}" = 'x-' ] && return 0; \
grep "^CONFIG_$${1}=y$$" <src/.config >/dev/null 2>&1; \
}
install_init_script = \
@@ -44,16 +45,21 @@ 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; \
install -p -m 0755 ../src.etc/init.d/rc dest/etc/init.d/rc; \
+ install -p -m 0755 ../src.etc/rc.common dest/etc/rc.common; \
ln -sf rc dest/etc/init.d/rcS; \
ln -sf rc dest/etc/init.d/rcK; \
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; \