summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild11
-rw-r--r--src/etc/os-release8
2 files changed, 17 insertions, 2 deletions
diff --git a/build b/build
index b58f810..97296cd 100755
--- a/build
+++ b/build
@@ -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@'