Better disk device picker
This commit is contained in:
parent
d4dc7a71cb
commit
191c121e12
@ -43,8 +43,19 @@ while true; do
|
|||||||
udevadm trigger --subsystem-match=input --action=change
|
udevadm trigger --subsystem-match=input --action=change
|
||||||
service keyboard-setup.sh restart
|
service keyboard-setup.sh restart
|
||||||
|
|
||||||
lsblk
|
YN="n"
|
||||||
read -p "Device (ALL DATA WILL BE ERASED): " DEVICE
|
while [ "$YN" == "n" ]; do
|
||||||
|
echo ""
|
||||||
|
lsblk -d -o PATH,SIZE
|
||||||
|
read -p "Device: " DEVICE
|
||||||
|
echo ""
|
||||||
|
lsblk "$DEVICE" -o NAME,SIZE,FSTYPE,PARTLABEL
|
||||||
|
read -p "All data on this disk will be erased! Continue? [y,n]: " YN
|
||||||
|
YN="$(echo "$YN" | tr "[:upper:]" "[:lower:]")"
|
||||||
|
if [ "$YN" != "y" ]; then
|
||||||
|
YN="n"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# Create partitions
|
# Create partitions
|
||||||
echo "Creating partitions ..."
|
echo "Creating partitions ..."
|
||||||
|
Loading…
Reference in New Issue
Block a user