summaryrefslogtreecommitdiff
path: root/package/base-files
diff options
context:
space:
mode:
authorDaniel Dickinson <lede@daniel.thecshore.com>2016-05-18 09:07:30 -0400
committerJo-Philipp Wich <jo@mein.io>2016-06-24 13:52:53 +0200
commitf954f4337b85bd8d8ad6a589bc63edf48f777ee6 (patch)
tree8158e3d8584d80f4960da16be581503c6ca07d54 /package/base-files
parent59e98b27c93d282edb62fad756fd1c1e587c067f (diff)
downloadmtk-20170518-f954f4337b85bd8d8ad6a589bc63edf48f777ee6.zip
mtk-20170518-f954f4337b85bd8d8ad6a589bc63edf48f777ee6.tar.gz
mtk-20170518-f954f4337b85bd8d8ad6a589bc63edf48f777ee6.tar.bz2
base-files: Add standard os-release file
/etc/os-release is the standard distribution release information file, therefore add it (and image configuration options for fields not previously present in LEDE). Once it is deemed reasonable the non-standard openwrt_release, openwrt_version, and device_info files could be removed (that is with this patch we consider them deprecated in favour of the standard file). Signed-off-by: Daniel Dickinson <lede@daniel.thecshore.com>
Diffstat (limited to 'package/base-files')
-rw-r--r--package/base-files/Makefile6
l---------package/base-files/files/etc/os-release1
-rw-r--r--package/base-files/files/usr/lib/os-release17
-rw-r--r--package/base-files/image-config.in20
4 files changed, 38 insertions, 6 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index e51d65a..5cfb019 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -138,11 +138,13 @@ define Package/base-files/install
$(VERSION_SED) \
$(1)/etc/banner \
- $(1)/etc/openwrt_version
+ $(1)/etc/openwrt_version \
+ $(1)/usr/lib/os-release
$(VERSION_SED_SCRIPT) \
$(1)/etc/openwrt_release \
- $(1)/etc/device_info
+ $(1)/etc/device_info \
+ $(1)/usr/lib/os-release
$(SED) "s#%PATH%#$(TARGET_INIT_PATH)#g" \
$(1)/sbin/hotplug-call \
diff --git a/package/base-files/files/etc/os-release b/package/base-files/files/etc/os-release
new file mode 120000
index 0000000..c4c75b4
--- /dev/null
+++ b/package/base-files/files/etc/os-release
@@ -0,0 +1 @@
+../usr/lib/os-release \ No newline at end of file
diff --git a/package/base-files/files/usr/lib/os-release b/package/base-files/files/usr/lib/os-release
new file mode 100644
index 0000000..6c829e0
--- /dev/null
+++ b/package/base-files/files/usr/lib/os-release
@@ -0,0 +1,17 @@
+NAME="%D"
+VERSION="%V, %N"
+ID="%d"
+ID_LIKE="lede openwrt"
+PRETTY_NAME="%D %N %V"
+VERSION_ID="%v"
+HOME_URL="%m"
+BUG_URL="%b"
+SUPPORT_URL="%s"
+BUILD_ID="%R"
+LEDE_BOARD="%S"
+LEDE_TAINTS="%t"
+LEDE_DEVICE_MANUFACTURER="%M"
+LEDE_DEVICE_MANUFACTURER_URL="%m"
+LEDE_DEVICE_PRODUCT="%P"
+LEDE_DEVICE_REVISION="%h"
+LEDE_RELEASE="%C"
diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in
index ef1d767..43d3859 100644
--- a/package/base-files/image-config.in
+++ b/package/base-files/image-config.in
@@ -148,10 +148,10 @@ menuconfig VERSIONOPT
default n
help
These options allow to override the version information embedded in
- the /etc/openwrt_version, /etc/openwrt_release, /etc/banner and
- /etc/opkg.conf files. Usually there is no need to set these, but
- they're useful for release builds or custom OpenWrt redistributions
- that should carry custom version tags.
+ the /etc/openwrt_version, /etc/openwrt_release, /etc/banner,
+ /etc/opkg.conf, and /etc/os-release files. Usually there is no need
+ to set these, but they're useful for release builds or custom OpenWrt
+ redistributions that should carry custom version tags.
if VERSIONOPT
@@ -216,6 +216,18 @@ if VERSIONOPT
This is an URL to the manufacturer's website embedded in /etc/device_info
Useful for OEMs building OpenWrt based firmware
+ config VERSION_BUG_URL
+ string
+ prompt "Bug reporting URL"
+ help
+ This is an URL to provide users for providing bug reports
+
+ config VERSION_SUPPORT_URL
+ string
+ prompt "Support URL"
+ help
+ This an URL to provide users seeking support
+
config VERSION_PRODUCT
string
prompt "Product name"