diff options
author | P. J. McDermott <pj@pehjota.net> | 2014-09-20 08:04:38 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2014-09-20 08:06:04 (EDT) |
commit | 54c1dc2ce325b82e16cc9cce895b7d442b2f4f21 (patch) | |
tree | db4bd7b3210264ce33a713b18e0e33f5d341e7d0 | |
parent | 2b91eb6d1ea7369d02abb225f59580a0f72b078a (diff) |
/etc/os-release: New file
-rwxr-xr-x | build | 11 | ||||
-rw-r--r-- | src/etc/os-release | 8 |
2 files changed, 17 insertions, 2 deletions
@@ -7,11 +7,18 @@ include ../macros.$(OPK_HOST_ARCH_KERNEL).mk version = $$(printf '%s\n' '$(OPK_SOURCE_VERSION)' | \ sed 's|\(^[0-9][0-9]*\.[0-9][0-9]*\).*$$|\1|') +dist_id = $$(printf '%s\n' "$${dist_name}" | tr '[A-Z]' '[a-z]' | \ + sed 's|[!a-z0-9_]|_|g') + # Set the distribution name in dist-vars.sh, not here. script = \ s|@DISTRIBUTION@|$${dist_name}|; \ s|@OS@|$(os)|; \ - s|@VERSION@|$(version)|; + s|@VERSION@|$(version)|; \ + s|@DISTRIBUTION_ID@|$(dist_id)|; \ + s|@DISTRIBUTION_ANSI_COLOR@|$(dist_ansi_color)|; \ + s|@DISTRIBUTION_HOME_URL@|$(dist_home_url)|; \ + s|@DISTRIBUTION_BUG_URL@|$(dist_bug_url)|; build: @@ -36,7 +43,7 @@ install: build sed ':l; N; $$!bl; s/\([^\n]\)\n\([^\n]\)/\1 \2/g' src/etc/motd | \ sed "$(script)" | fold -s -w 73 | sed 's/[ \t]*$$//' \ >>base-files.data/etc/motd; \ - for file in /etc/issue; do \ + for file in /etc/issue /etc/os-release; do \ sed "$(script)" "src/$${file}" >"base-files.data/$${file}"; \ done printf '%s\n' '$(OPK_HOST_ARCH)' >'base-files.data/etc/proteanos_arch' diff --git a/src/etc/os-release b/src/etc/os-release new file mode 100644 index 0000000..d2246e2 --- /dev/null +++ b/src/etc/os-release @@ -0,0 +1,8 @@ +NAME='@DISTRIBUTION@ @OS@' +VERSION='@VERSION@' +ID='@DISTRIBUTION_ID@' +VERSION_ID='@VERSION@' +PRETTY_NAME='@DISTRIBUTION@ @OS@ @VERSION@' +ANSI_COLOR='@DISTRIBUTION_ANSI_COLOR@' +HOME_URL='@DISTRIBUTION_HOME_URL@' +BUG_REPORT_URL='@DISTRIBUTION_BUG_URL@' |