summaryrefslogtreecommitdiff
path: root/scripts/make-version-file
diff options
context:
space:
mode:
authorDmitriyEshenko <dmitriy.eshenko@vyos.io>2021-02-23 18:56:47 +0000
committerChristian Poessinger <christian@poessinger.com>2021-02-24 21:18:35 +0100
commitce88bf41301227f5d8a5f47211c6f47d1692e0ef (patch)
tree9291beb78e2305d4b390fb3e7c080084e4f9f50d /scripts/make-version-file
parentf4be339392a75bda28a546547fe2ecf67660dda9 (diff)
downloadvyos-build-ce88bf41301227f5d8a5f47211c6f47d1692e0ef.tar.gz
vyos-build-ce88bf41301227f5d8a5f47211c6f47d1692e0ef.zip
T3303: Modify os_release file for changing Welcome message on boot
(cherry picked from commit e218a757616d27a5c31a3c39a175c5e73a376f23)
Diffstat (limited to 'scripts/make-version-file')
-rwxr-xr-xscripts/make-version-file17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/make-version-file b/scripts/make-version-file
index 5f394f3b..e35dfd8b 100755
--- a/scripts/make-version-file
+++ b/scripts/make-version-file
@@ -100,6 +100,18 @@ version_data = {
'build_comment': build_config['build_comment']
}
+os_release = f"""
+PRETTY_NAME="VyOS {version} ({build_config['release_train']})"
+NAME="VyOS"
+VERSION_ID="{version}"
+VERSION="{version} ({build_config['release_train']})"
+VERSION_CODENAME=buster
+ID=vyos
+HOME_URL="https://vyos.io"
+SUPPORT_URL="https://support.vyos.io"
+BUG_REPORT_URL="https://phabricator.vyos.net"
+"""
+
os.makedirs(os.path.join(defaults.CHROOT_INCLUDES_DIR, 'usr/share/vyos'), exist_ok=True)
with open(os.path.join(defaults.CHROOT_INCLUDES_DIR, 'usr/share/vyos/version.json'), 'w') as f:
json.dump(version_data, f)
@@ -116,3 +128,8 @@ with open(os.path.join(defaults.CHROOT_INCLUDES_DIR, 'opt/vyatta/etc/version'),
# neither we want to use lengthy paths in makefiles
with open(os.path.join(defaults.BUILD_DIR, 'version'), 'w') as f:
print(version, file=f)
+
+# Define variables that influence to welcome message on boot
+os.makedirs(os.path.join(defaults.CHROOT_INCLUDES_DIR, 'usr/lib/'), exist_ok=True)
+with open(os.path.join(defaults.CHROOT_INCLUDES_DIR, 'usr/lib//os-release'), 'w') as f:
+ print(os_release, file=f)