]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/commitdiff
Fix install script to take vd type discs
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Mon, 18 Dec 2017 13:58:15 +0000 (14:58 +0100)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Mon, 18 Dec 2017 14:24:35 +0000 (15:24 +0100)
bin/install_script.sh

index 15c770c15f2e7eb3606488e9e8e4df380310e5bf..d9d3808fdbb8f7f9fbf0650c553c48f76288b322 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)
 
@@ -201,7 +201,7 @@ puppet apply --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)