summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-06-26 12:47:01 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-06-26 12:47:01 (EDT)
commit9f42329a148e697b4aebbba73df16301c379d2f7 (patch)
tree698bc9eeef308676d12560482d0bcb3f0a42a34f /build
parent8008dc934ac51b68a231dc79460ee657b06fdc21 (diff)
Read distribution name & banner from dist-vars.sh.
Also, automatically add the correct number of newlines in /etc/motd.
Diffstat (limited to 'build')
-rwxr-xr-xbuild9
1 files changed, 6 insertions, 3 deletions
diff --git a/build b/build
index ef72cfd..8a47f95 100755
--- a/build
+++ b/build
@@ -8,7 +8,7 @@ version = $$(printf '%s\n' '$(OPK_SOURCE_VERSION)' | \
sed 's|\(^[0-9][0-9]*\.[0-9][0-9]*\).*$$|\1|')
script = \
- s|@DISTRIBUTION@|ProteanOS|; \
+ s|@DISTRIBUTION@|$${dist_name}|; \
s|@OS@|$(os)|; \
s|@VERSION@|$(version)|;
@@ -27,9 +27,12 @@ install: build
ln -s /run/lock base-files.data/var/lock
# Install base files.
set -e; \
+ . ../dist-vars.sh; \
+ printf "%s$${dist_motd_banner:+\n}\n" \
+ "$$(printf '%s' "$${dist_motd_banner}")" \
+ >base-files.data/etc/motd; \
sed ':l; N; $$!bl; s/\([^\n]\)\n\([^\n]\)/\1 \2/g' src/etc/motd | \
- sed "$(script)" | fold -s -w 72 >base-files.data/etc/motd
- set -e; \
+ sed "$(script)" | fold -s -w 72 >>base-files.data/etc/motd; \
for file in /etc/issue; do \
sed "$(script)" "src/$${file}" >"base-files.data/$${file}"; \
done