mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-10-02 16:16:19 +00:00
Update share-common.func
This commit is contained in:
@@ -386,26 +386,25 @@ select_container_mount_point() {
|
|||||||
mount_point="/mnt/$mount_point"
|
mount_point="/mnt/$mount_point"
|
||||||
pct exec "$ctid" -- mkdir -p "$mount_point" 2>/dev/null
|
pct exec "$ctid" -- mkdir -p "$mount_point" 2>/dev/null
|
||||||
;;
|
;;
|
||||||
|
|
||||||
2)
|
2)
|
||||||
existing_dirs=$(pct exec "$ctid" -- find /mnt -mindepth 1 -maxdepth 1 -type d 2>/dev/null | sort)
|
existing_dirs=$(pct exec "$ctid" -- find /mnt -mindepth 1 -maxdepth 1 -type d 2>/dev/null | sort)
|
||||||
|
|
||||||
if [[ -z "$existing_dirs" ]]; then
|
if [[ -z "$existing_dirs" ]]; then
|
||||||
whiptail --msgbox "$(translate "No existing directories found in /mnt")" 8 60
|
whiptail --msgbox "$(translate "No existing directories found in /mnt")" 8 60
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
options=()
|
||||||
|
while IFS= read -r dir; do
|
||||||
|
name=$(basename "$dir")
|
||||||
|
options+=("$dir" "$name")
|
||||||
|
done <<< "$existing_dirs"
|
||||||
mount_point=$(whiptail --title "$(translate "Select Existing Folder")" \
|
mount_point=$(whiptail --title "$(translate "Select Existing Folder")" \
|
||||||
--menu "$(translate "Choose a folder from /mnt:")" 20 70 10 \
|
--menu "$(translate "Choose a folder from /mnt:")" 20 70 10 "${options[@]}" 3>&1 1>&2 2>&3) || continue
|
||||||
$existing_dirs 3>&1 1>&2 2>&3) || continue
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
3)
|
3)
|
||||||
mount_point=$(whiptail --inputbox "$(translate "Enter full path:")" 10 70 "/mnt/shared" 3>&1 1>&2 2>&3) || continue
|
mount_point=$(whiptail --inputbox "$(translate "Enter full path:")" 10 70 "/mnt/shared" 3>&1 1>&2 2>&3) || continue
|
||||||
[[ -z "$mount_point" ]] && continue
|
[[ -z "$mount_point" ]] && continue
|
||||||
mount_point="/mnt/$mount_point"
|
|
||||||
pct exec "$ctid" -- mkdir -p "$mount_point" 2>/dev/null
|
pct exec "$ctid" -- mkdir -p "$mount_point" 2>/dev/null
|
||||||
;;
|
;;
|
||||||
|
|
||||||
4)
|
4)
|
||||||
return 1
|
return 1
|
||||||
;;
|
;;
|
||||||
@@ -424,6 +423,7 @@ select_container_mount_point() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ==========================================================
|
# ==========================================================
|
||||||
# CLIENT MOUNT FUNCTIONS (NFS/SAMBA COMMON)
|
# CLIENT MOUNT FUNCTIONS (NFS/SAMBA COMMON)
|
||||||
# ==========================================================
|
# ==========================================================
|
||||||
|
Reference in New Issue
Block a user