]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - bin/install_script.sh
Handle version changes
[perso/Immae/Projets/Puppet.git] / bin / install_script.sh
index 15c770c15f2e7eb3606488e9e8e4df380310e5bf..49a737fde8fe4d38ff9b61eef6858b1384558aea 100755 (executable)
@@ -116,7 +116,7 @@ tar -xzf "\$NAME"
 
 echo 'Server = http://archlinux.mirrors.ovh.net/archlinux/\$repo/os/\$arch' > /tmp/root.x86_64/etc/pacman.d/mirrorlist
 
-DEVICE_STR=\$(cat /proc/mounts | grep "/dev/sd.. /mnt/")
+DEVICE_STR=\$(cat /proc/mounts | grep "/dev/[sv]d.. /mnt/")
 DEVICE=\$(echo "\$DEVICE_STR" | cut -d' ' -f1)
 MOUNTPOINT=\$(echo "\$DEVICE_STR" | cut -d' ' -f2)
 
@@ -173,9 +173,9 @@ cat > $ARCH_INSTALL_SCRIPT <<EOF
 CODE_PATH="/etc/puppetlabs/code"
 rm -rf \$CODE_PATH
 git clone -b $git_branch --recursive https://git.immae.eu/perso/Immae/Projets/Puppet.git \$CODE_PATH
-puppet apply --test \$CODE_PATH/manifests/site.pp
+puppet apply --tags base_installation --test \$CODE_PATH/manifests/site.pp
 # The password seed requires puppet to be run twice
-puppet apply --test \$CODE_PATH/manifests/site.pp
+puppet apply --tags base_installation --test \$CODE_PATH/manifests/site.pp
 EOF
 
 chmod a+x $ARCH_HOST_SCRIPT $ARCH_CHROOT_SCRIPT $ARCH_INSTALL_SCRIPT
@@ -197,11 +197,11 @@ read -p "Press key when LDAP is configured" i
 
 cat > $ARCH_PUPPET_CONFIGURATION_SCRIPT <<EOF
 CODE_PATH="/etc/puppetlabs/code"
-puppet apply --test \$CODE_PATH/manifests/site.pp
+puppet apply --tags base_installation --test \$CODE_PATH/manifests/site.pp
 EOF
 
 cat > $ARCH_HOST_PUPPET_CONFIGURATION_SCRIPT <<EOF
-DEVICE_STR=\$(cat /proc/mounts | grep "/dev/sd.. /mnt/")
+DEVICE_STR=\$(cat /proc/mounts | grep "/dev/[sv]d.. /mnt/")
 DEVICE=\$(echo "\$DEVICE_STR" | cut -d' ' -f1)
 MOUNTPOINT=\$(echo "\$DEVICE_STR" | cut -d' ' -f2)