Use os-release to determine Debian version codename

This commit is contained in:
Jeremy Gardais 2020-08-06 17:00:52 +02:00
parent 34db514091
commit 04a72b1f0d
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 2 additions and 1 deletions

View File

@ -40,7 +40,8 @@ update-locale LANG="${NEW_L}"
# download an additionnal script to manage rsyslog and logrotate {{{ # download an additionnal script to manage rsyslog and logrotate {{{
debian_version=$(hostnamectl | grep "Operating System" | sed 's/.*(\(.*\))/\1/') # Previously used hostnamectl but it can't works correctly on LXC container with Apparmor
debian_version=$(grep VERSION_CODENAME /etc/os-release | cut -d"=" -f2)
wget https://git.ipr.univ-rennes1.fr/cellinfo/tftpboot/raw/master/scripts/latecommand.tar.gz -O /tmp/latecommand.tar.gz wget https://git.ipr.univ-rennes1.fr/cellinfo/tftpboot/raw/master/scripts/latecommand.tar.gz -O /tmp/latecommand.tar.gz
tar xzf /tmp/latecommand.tar.gz -C /tmp/ tar xzf /tmp/latecommand.tar.gz -C /tmp/