From: Michael Tremer Date: Sat, 30 Apr 2011 13:08:52 +0000 (+0200) Subject: system-release: Add /etc/os-release. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=466fab1f2df2ddf1f57e1d26dd2ca29604d7e3c4;p=ipfire-3.x.git system-release: Add /etc/os-release. File is proposed by systemd: http://0pointer.de/blog/projects/the-new-configuration-files.html --- diff --git a/pkgs/system-release/system-release.nm b/pkgs/system-release/system-release.nm index 9b7ab7e48..bf6c2cce7 100644 --- a/pkgs/system-release/system-release.nm +++ b/pkgs/system-release/system-release.nm @@ -24,10 +24,18 @@ include $(PKGROOT)/Include -PKG_NAME = system-release +# Make the configuration of your distribution right here. +DISTRO_NAME = IPFire +DISTRO_SNAME = ipfire +DISTRO_VERSION = 3.0-alpha2 +DISTRO_RELEASE = 3 +DISTRO_SLOGAN = Gluttony +DISTRO_COLOR = 0;31 + +PKG_NAME = $(DISTRO_SNAME)-release PKG_VER = $(DISTRO_VERSION) -PKG_REL = 2 -PKG_EPOCH = 1 +PKG_REL = 1 +PKG_EPOCH = 3 PKG_ARCH = noarch PKG_MAINTAINER = Michael Tremer @@ -36,11 +44,12 @@ PKG_URL = http://www.ipfire.org PKG_LICENSE = PKG_SUMMARY = $(DISTRO_NAME) release files. -PKG_PROVIDES += $(DISTRO_SNAME)-release +# In general to this package is referred as "system-release". +PKG_PROVIDES += system-release define PKG_DESCRIPTION $(DISTRO_NAME) release files such as pakfire configs and various /etc/ \ - files that define the release. + files that define the release. endef PKG_TARBALL = @@ -59,4 +68,16 @@ define STAGE_INSTALL echo "$(DISTRO_NAME) release $(DISTRO_VERSION) ($(DISTRO_SLOGAN))" \ > $(BUILDROOT)/etc/$(DISTRO_SNAME)-release ln -svf $(DISTRO_SNAME)-release $(BUILDROOT)/etc/system-release + + # Set a default hostname that is set until the user customizes that. + echo "$(DISTRO_SNAME).localdomain" > $(BUILDROOT)/etc/hostname + + # Create /etc/os-release. + echo "NAME=\"$(DISTRO_NAME)\"" >> $(BUILDROOT)/etc/os-release + echo "VERSION=\"$(DISTRO_VERSION)\"" >> $(BUILDROOT)/etc/os-release + echo "ID=$(DISTRO_SNAME)" >> $(BUILDROOT)/etc/os-release + echo "VERSION_ID=$(DISTRO_RELEASE)" >> $(BUILDROOT)/etc/os-release + echo "PRETTY_NAME=\"$(DISTRO_NAME) $(DISTRO_VERSION) ($(DISTRO_SLOGAN))\"" \ + >> $(BUILDROOT)/etc/os-release + echo "ANSI_COLOR=$(DISTRO_COLOR)" >> $(BUILDROOT)/etc/os-release endef