2023-04-30 19:45:10 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
trap cleanup 1 2 3 6 9 11 13 15
|
|
|
|
|
|
|
|
cleanup() {
|
|
|
|
doas umount /mnt
|
|
|
|
mount | grep mnt
|
|
|
|
}
|
|
|
|
|
|
|
|
usage() {
|
|
|
|
echo "usage: $(basename "$0") sd1"
|
|
|
|
dmesg |grep ^sd1 | tail -n2
|
|
|
|
dmesg |grep ^sd2 | tail -n2
|
|
|
|
dmesg |grep ^sd3 | tail -n2
|
|
|
|
dmesg |grep ^sd4 | tail -n2
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
[ -z "$1" ] && usage
|
|
|
|
|
2023-05-21 13:48:31 +02:00
|
|
|
doas mount_msdos /dev/$1i /mnt/
|
2023-04-30 19:45:10 +02:00
|
|
|
nnn /mnt/
|
|
|
|
cleanup
|