mirror of
https://git.bashclub.org/bashclub/zamba-lxc-toolbox.git
synced 2025-07-16 09:24:21 +02:00
Change lxc id detection
This commit is contained in:
parent
2892b7b416
commit
b9f92b610a
1 changed files with 1 additions and 2 deletions
|
@ -119,8 +119,7 @@ if [ $ctid -gt 99 ]; then
|
||||||
LXC_CHK=$ctid
|
LXC_CHK=$ctid
|
||||||
else
|
else
|
||||||
# Get next free LXC-number
|
# Get next free LXC-number
|
||||||
LXC_LST=$( lxc-ls -1 | tail -1 )
|
LXC_CHK=$(($(pct list | cut -d' ' -f1 | tail -1) + 1))
|
||||||
LXC_CHK=$((LXC_LST+1));
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $LXC_CHK -lt 100 ] || [ -f /etc/pve/qemu-server/$LXC_CHK.conf ]; then
|
if [ $LXC_CHK -lt 100 ] || [ -f /etc/pve/qemu-server/$LXC_CHK.conf ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue