mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-19 09:06:32 +00:00
fix: 运行脚本无法正确匹配回环设备名称的问题
This commit is contained in:
@ -5,11 +5,8 @@ if [ ! $uid == "0" ];then
|
||||
exit
|
||||
fi
|
||||
|
||||
LOOP_DEVICE=$(lsblk | grep disk_mount)
|
||||
|
||||
LOOP_DEVICE=${LOOP_DEVICE:2:10}
|
||||
LOOP_DEVICE=${LOOP_DEVICE%%p1*}
|
||||
LOOP_DEVICE=$(lsblk | grep disk_mount|sed 's/.*\(loop[0-9]*\)p1.*/\1/1g'|awk 'END{print $0}')
|
||||
|
||||
umount -f ../bin/disk_mount/
|
||||
losetup -d /dev/$LOOP_DEVICE
|
||||
echo $LOOP_DEVICE
|
||||
echo $LOOP_DEVICE
|
Reference in New Issue
Block a user