tweaks to make vars more logical
[automated-distro-installer] / fai / config / hooks / partition.DEFAULT
index ed12111b993c34d16f070f79ea9634ac9625de2b..ca7b86dbcd31f399fddc7b722cf018e36f20a196 100755 (executable)
@@ -195,12 +195,12 @@ fi
 
 
 if [[ ! $DISTRO ]]; then
-    if ifclass VOL_STABLE_BOOTSTRAP; then
-        DISTRO=debianstable_bootstrap
+    if ifclass VOL_STRETCH_BOOTSTRAP; then
+        DISTRO=stretch_bootstrap
     elif ifclass VOL_STRETCH; then
+        DISTRO=debianstretch
+    elif ifclass VOL_TESTING; then
         DISTRO=debiantesting
-    elif ifclass VOL_STABLE; then
-        DISTRO=debianstable
     elif ifclass VOL_XENIAL; then
         DISTRO=ubuntuxenial
     elif ifclass VOL_BELENOS; then
@@ -365,7 +365,7 @@ else
 fi
 
 
-if [[ $DISTRO != debianstable_bootstrap ]]; then
+if [[ $DISTRO != stretch_bootstrap ]]; then
     # bootstrap distro doesn't use separate encrypted root.
     mount -o subvolid=0 $first_root_crypt /mnt
     # systemd creates subvolumes we want to delete.
@@ -403,7 +403,7 @@ btrfs subvolume set-default 0 /mnt # already default, just ensuring it.
 mkdir -p /mnt/grub2
 cp $FAI/distro-install-common/libreboot_grub.cfg /mnt/grub2
 
-if [[ $DISTRO == debianstable_bootstrap ]]; then
+if [[ $DISTRO == stretch_bootstrap ]]; then
     # this is just convenience for the libreboot_grub config
     # so we can glob the other ones easier.
     boot_vol=$DISTRO
@@ -422,7 +422,7 @@ grub-editenv /mnt/grubenv set did_fai_check=true
 grub-editenv /mnt/grubenv set last_boot=/$boot_vol
 umount /mnt
 
-if [[ $DISTRO == debianstable_bootstrap ]]; then
+if [[ $DISTRO == stretch_bootstrap ]]; then
     cat > /tmp/fai/fstab <<EOF
 $first_boot_dev  /  btrfs  noatime,subvol=$boot_vol  0 0
 EOF