Add possibility to choose the version of Debian

This commit is contained in:
Jeremy Gardais 2019-08-05 17:45:43 +02:00
parent 33d25dba12
commit 69a11ff240
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 4 additions and 2 deletions

View File

@ -8,6 +8,8 @@ else
printf '%b\n' "Please check the hard drive to use" printf '%b\n' "Please check the hard drive to use"
exit 0 exit 0
fi fi
## Which version of Debian should be installed
debian_version="stretch"
## Computer hostname ## Computer hostname
## If empty, the script will try to get one with nslookup ## If empty, the script will try to get one with nslookup
new_hostname="" new_hostname=""
@ -166,7 +168,7 @@ fi
swapon -- /dev/mapper/"${vgname}"-swap swapon -- /dev/mapper/"${vgname}"-swap
## }}} ## }}}
## Run debootstrap ## Run debootstrap
debootstrap --arch amd64 --include="${dbs_pkg_include}" --exclude="${dbs_pkg_exclude}" stretch /target http://ftp.fr.debian.org/debian debootstrap --arch amd64 --include="${dbs_pkg_include}" --exclude="${dbs_pkg_exclude}" "${debian_version}" /target http://ftp.fr.debian.org/debian
# }}} # }}}
# Configure system {{{ # Configure system {{{
@ -250,7 +252,7 @@ fi
## Call a latecommand script {{{ ## Call a latecommand script {{{
wget -O /tmp/latecommand.tar.gz "https://git.ipr.univ-rennes1.fr/cellinfo/tftpboot/raw/master/scripts/latecommand.tar.gz" --no-check-certificate wget -O /tmp/latecommand.tar.gz "https://git.ipr.univ-rennes1.fr/cellinfo/tftpboot/raw/master/scripts/latecommand.tar.gz" --no-check-certificate
tar xzf /tmp/latecommand.tar.gz -C /target/tmp/ tar xzf /tmp/latecommand.tar.gz -C /target/tmp/
chroot /target /bin/sh /tmp/latecommand/post.stretch.sh chroot /target /usr/bin/env debian_version="${debian_version}" /bin/sh /tmp/latecommand/post."${debian_version}".sh
## }}} ## }}}
## SSH {{{ ## SSH {{{