Made filesystem read-only

This commit is contained in:
Sun Knudsen 2021-03-03 15:10:07 -05:00
parent 30ded25c92
commit 3e1049d0ed
No known key found for this signature in database
GPG key ID: 1FA767862BBD1305
3 changed files with 118 additions and 16 deletions

View file

@ -35,8 +35,8 @@ normal=$(tput sgr0)
basedir=$(dirname "$0")
dev="/dev/sda1"
tmp="/home/pi/tmp"
usb="/home/pi/usb"
tmp="/tmp/pi"
usb="/tmp/usb"
tput reset
@ -60,11 +60,6 @@ if [ "$answer" = "y" ]; then
sudo mkfs -t vfat $dev
fi
sudo mkdir -p $tmp
if ! mount | grep $tmp > /dev/null; then
sudo mount -t tmpfs -o size=100m tmp $tmp
fi
sudo mkdir -p $usb
if ! mount | grep $usb > /dev/null; then
sudo mount $dev $usb -o uid=pi,gid=pi
@ -131,8 +126,6 @@ if [ "$answer" = "y" ]; then
sudo fim --autozoom --quiet --vt 1 "$tmp/secret-hash.png"
fi
sudo umount $tmp
sudo umount $usb
printf "%s\n" "Done"