mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-25 17:25:53 +00:00
mount
This commit is contained in:
@@ -283,6 +283,9 @@ if [ "$UDHCPC_FIX" == "yes" ]; then
|
||||
# Ensure container is mounted
|
||||
if ! mount | grep -q "/var/lib/lxc/${CTID}/rootfs"; then
|
||||
pct mount "$CTID" >/dev/null 2>&1
|
||||
MOUNTED_HERE=true
|
||||
else
|
||||
MOUNTED_HERE=false
|
||||
fi
|
||||
|
||||
CONFIG_FILE="/var/lib/lxc/${CTID}/rootfs/etc/udhcpc/udhcpc.conf"
|
||||
@@ -307,6 +310,11 @@ if [ "$UDHCPC_FIX" == "yes" ]; then
|
||||
else
|
||||
msg_error "udhcpc.conf not found in $CONFIG_FILE after waiting"
|
||||
fi
|
||||
|
||||
# Clean up: only unmount if we mounted it here
|
||||
if [ "${MOUNTED_HERE}" = true ]; then
|
||||
pct unmount "$CTID" >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
msg_ok "LXC Container ${BL}$CTID${CL} ${GN}was successfully created."
|
||||
|
||||
Reference in New Issue
Block a user