summaryrefslogtreecommitdiff
path: root/scripts/build/installer_debian-installer
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-08-10 21:31:17 +0200
committerDaniel Baumann <mail@daniel-baumann.ch>2015-08-10 21:31:21 +0200
commit421419c7fc96df18c422102a52879dd6860725a6 (patch)
tree3edd25d85befdd16b36916e098e52a035c04b781 /scripts/build/installer_debian-installer
parent44ab7590386050c06b828a1b37bbbc8d1c45f5ae (diff)
downloadvyos-live-build-421419c7fc96df18c422102a52879dd6860725a6.tar.gz
vyos-live-build-421419c7fc96df18c422102a52879dd6860725a6.zip
Getting rid of hard-coded release numbers and using /etc/os-release instead (Closes: #790860).
Unfortunately VERSION_ID on testing/unstable is currently not included in /etc/os-release, see #795124.
Diffstat (limited to 'scripts/build/installer_debian-installer')
-rwxr-xr-xscripts/build/installer_debian-installer6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/build/installer_debian-installer b/scripts/build/installer_debian-installer
index 84726ceae..5445753da 100755
--- a/scripts/build/installer_debian-installer
+++ b/scripts/build/installer_debian-installer
@@ -663,7 +663,11 @@ then
# Generating release file
mv binary chroot/root
- eval _VERSION="$`echo RELEASE_${LB_PARENT_DISTRIBUTION}`"
+ if [ -e chroot/etc/os-release ]
+ then
+ _VERSION="$(. chroot/etc/os-release && echo ${VERSION_ID})"
+ fi
+
if [ -n "${_VERSION}" ]; then
_LB_APT_VERSION_OPT='-o APT::FTPArchive::Release::Version="'"${_VERSION}"'"'
fi