diff options
author | P. 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) |
commit | 9f42329a148e697b4aebbba73df16301c379d2f7 (patch) | |
tree | 698bc9eeef308676d12560482d0bcb3f0a42a34f /build | |
parent | 8008dc934ac51b68a231dc79460ee657b06fdc21 (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-x | build | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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 |