Commit 2e53a24a authored by Geoffrey Gekiere's avatar Geoffrey Gekiere

mode "no prompt" de parted ajouté aux options de création de persistence

parent 9db2ca35
#!/bin/bash
# Script de création de la persistance de la clé studiobox
VERIFPERSIST=$(ls / | grep persistence)
VERIFPERSIST=$(ls /lib/live/mount/persistence/sd* | grep persistence.conf)
if [ "$VERIFPERSIST" = "persistence.conf" ]; then
echo "La persistance existe déjà"
......@@ -19,9 +19,9 @@ if [ "$CLE" = "" ]
fi
echo "*** Création de la partiton persistante"
START=`LC_ALL=C sudo parted $CLE print free | grep Free | grep [MG]B | gawk '{print $1}'`
END=`LC_ALL=C sudo parted $CLE print free | grep Free | grep [MG]B | gawk '{print $2}'`
sudo parted -a optimal $CLE mkpart primary ext2 $START $END
START=`LC_ALL=C sudo parted -s $CLE print free | grep Free | grep [MG]B | gawk '{print $1}'`
END=`LC_ALL=C sudo parted -s $CLE print free | grep Free | grep [MG]B | gawk '{print $2}'`
sudo parted -a -s optimal $CLE mkpart primary ext2 $START $END
sudo mkfs.ext2 $CLE$PART2
echo "*** définition du label « persistence »"
sudo tune2fs -L persistence $CLE$PART2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment