From 69a11ff240c611a404a8340947aadb9862946543 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Mon, 5 Aug 2019 17:45:43 +0200 Subject: [PATCH] Add possibility to choose the version of Debian --- debian/chroot.install | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/chroot.install b/debian/chroot.install index a936bcf..b8ec89e 100755 --- a/debian/chroot.install +++ b/debian/chroot.install @@ -8,6 +8,8 @@ else printf '%b\n' "Please check the hard drive to use" exit 0 fi +## Which version of Debian should be installed +debian_version="stretch" ## Computer hostname ## If empty, the script will try to get one with nslookup new_hostname="" @@ -166,7 +168,7 @@ fi swapon -- /dev/mapper/"${vgname}"-swap ## }}} ## 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 {{{ @@ -250,7 +252,7 @@ fi ## 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 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 {{{