From 9f42329a148e697b4aebbba73df16301c379d2f7 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 26 Jun 2014 12:47:01 -0400 Subject: Read distribution name & banner from dist-vars.sh. Also, automatically add the correct number of newlines in /etc/motd. --- (limited to 'build') 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 -- cgit v0.9.1