summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-08-08 15:23:43 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-08-08 15:23:43 (EDT)
commit55628d8d4ee3eca18c17997e0c5d91651b3fb0b5 (patch)
treec76350aa422966a4cc4ca16989ca5fdbc434d1cb /build
parentab2b06e6f99b173c61ab5d387839c9bfcded8e51 (diff)
build: Install new files in /etc and /var.
Diffstat (limited to 'build')
-rwxr-xr-xbuild25
1 files changed, 25 insertions, 0 deletions
diff --git a/build b/build
index c2caae6..e254870 100755
--- a/build
+++ b/build
@@ -2,6 +2,18 @@
include ../source.mk
+config_enabled = \
+ config_enabled() \
+ { \
+ grep "^CONFIG_$${1}=y$$" <src/.config >/dev/null 2>&1; \
+ }
+install_init_script = \
+ install_init_script() \
+ { \
+ install -p -m 0755 "../src.etc/init.d/$${1}" \
+ "dest/etc/init.d/$${1}"; \
+ }
+
nop:
@:
@@ -17,4 +29,17 @@ install:
mv dest/usr/bin/strings dest/usr/bin/strings.busybox
mv dest/usr/bin/clear dest/usr/bin/clear.busybox
mv dest/usr/bin/reset dest/usr/bin/reset.busybox
+ set -e; $(config_enabled); $(install_init_script); \
+ if config_enabled INIT; then \
+ install -d -m 0755 dest/etc/init.d; \
+ config_enabled HOSTNAME && install_init_script hostname; \
+ config_enabled HTTPD && install_init_script httpd && \
+ install -d -m 0755 dest/var/www && \
+ install -p -m 0644 ../src.var/www/index.html \
+ dest/var/www/index.html; \
+ config_enabled MDEV && install_init_script mdev; \
+ config_enabled IFUPDOWN && install_init_script networking; \
+ config_enabled SYSLOGD && install_init_script syslog; \
+ config_enabled TELNETD && install_init_script telnetd; \
+ fi
oh-installfiles