1# ======检查是否以sudo运行================= 2uid=`id -u` 3if [ ! $uid == "0" ];then 4 echo "请以sudo权限运行" 5 exit 6fi 7 8LOOP_DEVICE=$(lsblk | grep disk_mount) 9umount -f ../bin/disk_mount/ 10losetup -d /dev/${LOOP_DEVICE:2:5} 11echo ${LOOP_DEVICE:2:5}
1# ======检查是否以sudo运行================= 2uid=`id -u` 3if [ ! $uid == "0" ];then 4 echo "请以sudo权限运行" 5 exit 6fi 7 8LOOP_DEVICE=$(lsblk | grep disk_mount) 9umount -f ../bin/disk_mount/ 10losetup -d /dev/${LOOP_DEVICE:2:5} 11echo ${LOOP_DEVICE:2:5}