Add genfstab choice

This commit is contained in:
MatMoul 2018-12-31 23:18:09 +01:00
parent 85240709b6
commit 33b9475453

33
archfi
View file

@ -817,7 +817,7 @@ archmenu(){
nextitem="${txtgenerate//%1/fstab}" nextitem="${txtgenerate//%1/fstab}"
;; ;;
"${txtgenerate//%1/fstab}") "${txtgenerate//%1/fstab}")
archgenfstab archgenfstabmenu
if [ "$luksdrive" = "1" ]; then if [ "$luksdrive" = "1" ]; then
nextitem="${txtgenerate//%1/crypttab}" nextitem="${txtgenerate//%1/crypttab}"
else else
@ -1026,10 +1026,39 @@ archsetrootpasswordchroot(){
exit exit
} }
archgenfstab(){ archgenfstabmenu(){
options=()
options+=("UUID" "genfstab -U")
options+=("LABEL" "genfstab -L")
options+=("PARTUUID" "genfstab -t PARTUUID")
options+=("PARTLABEL" "genfstab -t PARTLABEL")
sel=$(whiptail --backtitle "$apptitle" --title "ARCHGENFSTABMENU" --menu "" --cancel-button "$txtback" --default-item "$nextitem" 0 0 0 \
"${options[@]}" \
3>&1 1>&2 2>&3)
if [ "$?" = "0" ]; then
case $sel in
"UUID")
clear clear
echo "genfstab -U -p /mnt > /mnt/etc/fstab" echo "genfstab -U -p /mnt > /mnt/etc/fstab"
genfstab -U -p /mnt > /mnt/etc/fstab genfstab -U -p /mnt > /mnt/etc/fstab
;;
"LABEL")
clear
echo "genfstab -L -p /mnt > /mnt/etc/fstab"
genfstab -L -p /mnt > /mnt/etc/fstab
;;
"PARTUUID")
clear
echo "genfstab -t PARTUUID -p /mnt > /mnt/etc/fstab"
genfstab -t PARTUUID -p /mnt > /mnt/etc/fstab
;;
"PARTLABEL")
clear
echo "genfstab -t PARTLABEL -p /mnt > /mnt/etc/fstab"
genfstab -t PARTLABEL -p /mnt > /mnt/etc/fstab
;;
esac
fi
pressanykey pressanykey
} }