public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH] Add /etc/os-release
@ 2020-04-09 20:45 Michael Tremer
  0 siblings, 0 replies; only message in thread
From: Michael Tremer @ 2020-04-09 20:45 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 2152 bytes --]

This file is being read by some packages to find out on what
distribution they are running on.

This file needs to be included in every Core Update.

Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
---
 config/rootfiles/common/aarch64/stage2 | 1 +
 config/rootfiles/common/stage2         | 1 +
 config/rootfiles/common/x86_64/stage2  | 1 +
 lfs/stage2                             | 9 +++++++++
 4 files changed, 12 insertions(+)

diff --git a/config/rootfiles/common/aarch64/stage2 b/config/rootfiles/common/aarch64/stage2
index f4169a44e..82e2c20d0 100644
--- a/config/rootfiles/common/aarch64/stage2
+++ b/config/rootfiles/common/aarch64/stage2
@@ -28,6 +28,7 @@ etc/modules.conf
 etc/mtab
 etc/nsswitch.conf
 #etc/opt
+etc/os-release
 etc/passwd
 etc/profile
 #etc/profile.d
diff --git a/config/rootfiles/common/stage2 b/config/rootfiles/common/stage2
index fca540431..8067df39b 100644
--- a/config/rootfiles/common/stage2
+++ b/config/rootfiles/common/stage2
@@ -28,6 +28,7 @@ etc/modules.conf
 etc/mtab
 etc/nsswitch.conf
 #etc/opt
+etc/os-release
 etc/passwd
 etc/profile
 #etc/profile.d
diff --git a/config/rootfiles/common/x86_64/stage2 b/config/rootfiles/common/x86_64/stage2
index cc67837e5..026532b8f 100644
--- a/config/rootfiles/common/x86_64/stage2
+++ b/config/rootfiles/common/x86_64/stage2
@@ -28,6 +28,7 @@ etc/modules.conf
 etc/mtab
 etc/nsswitch.conf
 #etc/opt
+etc/os-release
 etc/passwd
 etc/profile
 #etc/profile.d
diff --git a/lfs/stage2 b/lfs/stage2
index 355aeef54..d6012b85e 100644
--- a/lfs/stage2
+++ b/lfs/stage2
@@ -145,6 +145,15 @@ endif
 	# System release
 	echo "$(SYSTEM_RELEASE)" > /etc/system-release
 
+	# OS release
+	: >/etc/os-release
+	echo "NAME=\"$(NAME)\"" >> /etc/os-release
+	echo "VERSION=\"$(VERSION)\"" >> /etc/os-release
+	echo "ID=$(SNAME)" >> /etc/os-release
+	echo "VERSION_ID=2" >> /etc/os-release
+	echo "PRETTY_NAME=\"$(SYSTEM_RELEASE)\"" >> /etc/os-release
+	echo "ANSI_COLOR=\"0:31\"" >> /etc/os-release
+
 	# Pakfire
 	-mkdir -pv /opt/pakfire/db/core
 	echo "$(CORE)" > /opt/pakfire/db/core/mine
-- 
2.20.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-09 20:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-09 20:45 [PATCH] Add /etc/os-release Michael Tremer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox