Update create_lxc.sh
This commit is contained in:
parent
48e39d5a0b
commit
2018921f92
@ -244,7 +244,10 @@ PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}})
|
|||||||
|
|
||||||
# Secure creation of the LXC container with lock and template check
|
# Secure creation of the LXC container with lock and template check
|
||||||
lockfile="/tmp/template.${TEMPLATE}.lock"
|
lockfile="/tmp/template.${TEMPLATE}.lock"
|
||||||
exec 9>"$lockfile"
|
exec 9>"$lockfile" >/dev/null 2>&1 || {
|
||||||
|
msg_error "Failed to create lock file '$lockfile'."
|
||||||
|
exit 200
|
||||||
|
}
|
||||||
flock -w 60 9 || {
|
flock -w 60 9 || {
|
||||||
msg_error "Timeout while waiting for template lock"
|
msg_error "Timeout while waiting for template lock"
|
||||||
exit 211
|
exit 211
|
||||||
|
Loading…
x
Reference in New Issue
Block a user