mount
This commit is contained in:
parent
2d9fc6158a
commit
e2c9f279a3
@ -283,6 +283,9 @@ if [ "$UDHCPC_FIX" == "yes" ]; then
|
|||||||
# Ensure container is mounted
|
# Ensure container is mounted
|
||||||
if ! mount | grep -q "/var/lib/lxc/${CTID}/rootfs"; then
|
if ! mount | grep -q "/var/lib/lxc/${CTID}/rootfs"; then
|
||||||
pct mount "$CTID" >/dev/null 2>&1
|
pct mount "$CTID" >/dev/null 2>&1
|
||||||
|
MOUNTED_HERE=true
|
||||||
|
else
|
||||||
|
MOUNTED_HERE=false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CONFIG_FILE="/var/lib/lxc/${CTID}/rootfs/etc/udhcpc/udhcpc.conf"
|
CONFIG_FILE="/var/lib/lxc/${CTID}/rootfs/etc/udhcpc/udhcpc.conf"
|
||||||
@ -307,6 +310,11 @@ if [ "$UDHCPC_FIX" == "yes" ]; then
|
|||||||
else
|
else
|
||||||
msg_error "udhcpc.conf not found in $CONFIG_FILE after waiting"
|
msg_error "udhcpc.conf not found in $CONFIG_FILE after waiting"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Clean up: only unmount if we mounted it here
|
||||||
|
if [ "${MOUNTED_HERE}" = true ]; then
|
||||||
|
pct unmount "$CTID" >/dev/null 2>&1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_ok "LXC Container ${BL}$CTID${CL} ${GN}was successfully created."
|
msg_ok "LXC Container ${BL}$CTID${CL} ${GN}was successfully created."
|
||||||
|
@ -95,6 +95,14 @@ msg_error() {
|
|||||||
echo -e "${BFR}${CROSS}${RD}${msg}${CL}"
|
echo -e "${BFR}${CROSS}${RD}${msg}${CL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stop_spinner() {
|
||||||
|
if [ -n "${SPINNER_PID:-}" ]; then
|
||||||
|
kill "$SPINNER_PID" >/dev/null 2>&1
|
||||||
|
wait "$SPINNER_PID" 2>/dev/null
|
||||||
|
unset SPINNER_PID
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# This function sets up the Container OS by generating the locale, setting the timezone, and checking the network connection
|
# This function sets up the Container OS by generating the locale, setting the timezone, and checking the network connection
|
||||||
setting_up_container() {
|
setting_up_container() {
|
||||||
msg_info "Setting up Container OS"
|
msg_info "Setting up Container OS"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user