Merge branch 'main' into dev
This commit is contained in:
commit
892eef424c
|
@ -30,31 +30,39 @@ do_mount() {
|
||||||
|
|
||||||
# Figure out a mount point to use
|
# Figure out a mount point to use
|
||||||
# LABEL=${ID_FS_LABEL}
|
# LABEL=${ID_FS_LABEL}
|
||||||
# LABEL=${DEVBASE}
|
LABEL=${DEVBASE}
|
||||||
# if grep -q " /DATA/USB_${LABEL} " /etc/mtab; then
|
if grep -q " /DATA/USB_Storage_${LABEL} " /etc/mtab; then
|
||||||
# # Already in use, make a unique one
|
# Already in use, make a unique one
|
||||||
# LABEL+="-${DEVBASE}"
|
LABEL+="_${DEVBASE}"
|
||||||
# fi
|
fi
|
||||||
# DEV_LABEL="${LABEL}"
|
DEV_LABEL="${LABEL}"
|
||||||
|
|
||||||
# # Use the device name in case the drive doesn't have label
|
# Use the device name in case the drive doesn't have label
|
||||||
# if [ -z ${DEV_LABEL} ]; then
|
if [ -z ${DEV_LABEL} ]; then
|
||||||
# DEV_LABEL="${DEVBASE}"
|
DEV_LABEL="${DEVBASE}"
|
||||||
# fi
|
fi
|
||||||
|
|
||||||
MOUNT_POINT="/DATA/USB_Storage1"
|
|
||||||
arr=("/DATA/USB_Storage1" "/DATA/USB_Storage2" "/DATA/USB_Storage3" "/DATA/USB_Storage4" "/DATA/USB_Storage5" "/DATA/USB_Storage6" "/DATA/USB_Storage7" "/DATA/USB_Storage8" "/DATA/USB_Storage9" "/DATA/USB_Storage10" "/DATA/USB_Storage11" "/DATA/USB_Storage12")
|
MOUNT_POINT="/DATA/USB_Storage_${DEV_LABEL}"
|
||||||
for folder in ${arr[@]}; do
|
|
||||||
#如果文件夹不存在,创建文件夹
|
|
||||||
if [ ! -d "$folder" ]; then
|
|
||||||
mkdir -p ${folder}
|
|
||||||
MOUNT_POINT=$folder
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
${log} "Mount point: ${MOUNT_POINT}"
|
${log} "Mount point: ${MOUNT_POINT}"
|
||||||
|
|
||||||
|
mkdir -p ${MOUNT_POINT}
|
||||||
|
|
||||||
|
|
||||||
|
# MOUNT_POINT="/DATA/USB_Storage1"
|
||||||
|
# arr=("/DATA/USB_Storage1" "/DATA/USB_Storage2" "/DATA/USB_Storage3" "/DATA/USB_Storage4" "/DATA/USB_Storage5" "/DATA/USB_Storage6" "/DATA/USB_Storage7" "/DATA/USB_Storage8" "/DATA/USB_Storage9" "/DATA/USB_Storage10" "/DATA/USB_Storage11" "/DATA/USB_Storage12")
|
||||||
|
# for folder in ${arr[@]}; do
|
||||||
|
# #如果文件夹不存在,创建文件夹
|
||||||
|
# if [ ! -d "$folder" ]; then
|
||||||
|
# mkdir -p ${folder}
|
||||||
|
# MOUNT_POINT=$folder
|
||||||
|
# break
|
||||||
|
# fi
|
||||||
|
# done
|
||||||
|
|
||||||
|
# ${log} "Mount point: ${MOUNT_POINT}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# # Global mount options
|
# # Global mount options
|
||||||
|
|
Loading…
Reference in a new issue