initial commit
This commit is contained in:
commit
b4501dd6ea
15
mountUSB.sh
Normal file
15
mountUSB.sh
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
device=$1
|
||||
|
||||
if [ ${#device} -gt "3" ]; then
|
||||
label=$(blkid "/dev/$device" -s LABEL -o value)
|
||||
if [ ${#label} -gt "0" ]; then
|
||||
mountName="$label"
|
||||
else
|
||||
mountName="$device"
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p "/media/$mountName"
|
||||
mount -o ro "/dev/disk/by-uuid/$(blkid "/dev/$device" -s UUID -o value)" "/media/$mountName"
|
||||
echo "Mounted $(blkid "/dev/$device" -s UUID -o value) to $mountName inside media"
|
Loading…
Reference in a new issue