Implement variable rootfs types as well.

This commit is contained in:
parazyd 2018-03-13 20:11:45 +01:00
parent 2d4e038046
commit a6a8838d20
No known key found for this signature in database
GPG Key ID: F0CB28FCF78637DE
1 changed files with 28 additions and 2 deletions

View File

@ -63,8 +63,34 @@ image_format_partitions() {
;;
esac
act "formatting root as ext4"
sudo mkfs.ext4 ${rootpart}
# default to ext4
[[ -z "$rootfs"]] && rootfs=ext4
case "$rootfs" in
none)
act "skipping root partition"
;;
vfat|fat|dos)
act "formatting root as vfat"
sudo mkfs.vfat ${=rootopts} ${rootpart}
;;
ext4)
act "formatting root as ext4"
sudo mkfs.ext4 ${=rootopts} ${rootpart}
;;
ext2)
act "formating root as ext2"
sudo mkfs.ext2 ${=rootopts} ${rootpart}
;;
btrfs)
act "formatting root as btrfs"
sudo mfks.btrfs ${=rootopts} ${rootpart}
;;
*)
error "unknown parted_rootfs type '$rootfs'"
zerr
;;
esac
}
image_partition_raw_dos() {