fix arch install with new partition scheme
[automated-distro-installer] / arch-init-chroot
index 53a2b944f72ad2583e8d16f0aa9500f4f8633d21..e4dcb41a82f1b8e514d20851ccc0181af2b261fa 100755 (executable)
@@ -56,14 +56,14 @@ if [[ $hostname == x2 || $hostname == demohost ]]; then
     # but, if you are using your own fstab, it seems you just give it a name,
     # which will be the crypt device name under /dev/mapper/
     # https://wiki.archlinux.org/index.php/GRUB#Additional_arguments
-    crypt_dev=(/dev/?da3)
+    crypt_dev=(/dev/?da$rootn)
     crypt_name=crypt_dev_${crypt_dev##/dev/}
     k_args=(
         cryptdevice=$crypt_dev:$crypt_name:allow-discards
         root=/dev/mapper/$crypt_name
-        resume=${crypt_dev%3}2
+        resume=${crypt_dev%[0-9]}$swapn
     )
-    crypt_mapper_devs=(/dev/mapper/crypt_dev_?d[a-z]3)
+    crypt_mapper_devs=(/dev/mapper/crypt_dev_?d[a-z]$rootn)
     keyfile_vars=()
     for ((i=1; i < ${#crypt_mapper_devs[@]}; i++)); do
         ((i!=1)) || dup_keys=(" ")