From 4019e49b07e6d932d52d7657a4c546d338de19ea Mon Sep 17 00:00:00 2001 From: MacRimi Date: Sat, 6 Sep 2025 22:51:57 +0200 Subject: [PATCH] Update share-common.func --- scripts/global/share-common.func | 43 +------------------------------- 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/scripts/global/share-common.func b/scripts/global/share-common.func index ca92c48..0b8c113 100644 --- a/scripts/global/share-common.func +++ b/scripts/global/share-common.func @@ -457,7 +457,7 @@ select_lxc_container() { -select_container_mount_point_() { +select_container_mount_point() { local ctid="$1" local host_dir="$2" local choice mount_point existing_dirs options @@ -506,47 +506,6 @@ select_container_mount_point_() { -select_container_mount_point() { - local ctid="$1" - local host_dir="$2" - local choice mount_point existing_dirs options - - while true; do - choice=$(dialog --title "$(translate "Configure Mount Point inside LXC")" \ - --menu "$(translate "Where to mount inside container?")" 18 70 5 \ - "1" "$(translate "Create new directory in /mnt")" \ - "2" "$(translate "Enter path manually")" \ - "3" "$(translate "Cancel")" 3>&1 1>&2 2>&3) || return 1 - - case "$choice" in - 1) - mount_point=$(whiptail --inputbox "$(translate "Enter folder name for /mnt:")" 10 60 "shared" 3>&1 1>&2 2>&3) || continue - [[ -z "$mount_point" ]] && continue - mount_point="/mnt/$mount_point" - pct exec "$ctid" -- mkdir -p "$mount_point" 2>/dev/null - ;; - - 2) - mount_point=$(whiptail --inputbox "$(translate "Enter full path:")" 10 70 "/mnt/shared" 3>&1 1>&2 2>&3) || continue - [[ -z "$mount_point" ]] && continue - mount_point="/mnt/$mount_point" - pct exec "$ctid" -- mkdir -p "$mount_point" 2>/dev/null - ;; - - 3) - return 1 - ;; - esac - - if pct exec "$ctid" -- test -d "$mount_point" 2>/dev/null; then - echo "$mount_point" - return 0 - else - whiptail --msgbox "$(translate "Could not create or access directory:") $mount_point" 8 70 - continue - fi - done -}