mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-17 18:31:41 +00:00
*add the new opts to help() *set container_running=false
Signed-off-by: InformatiQ <rhanna@informatiq.org> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com> Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
This commit is contained in:
parent
27078f4422
commit
8534a83e94
@ -36,8 +36,8 @@ help() {
|
|||||||
echo "-s : make the new rootfs a snapshot of the original"
|
echo "-s : make the new rootfs a snapshot of the original"
|
||||||
echo "fssize : size if creating a new fs. By default, 2G"
|
echo "fssize : size if creating a new fs. By default, 2G"
|
||||||
echo "vgname : lvm volume group name, lxc by default"
|
echo "vgname : lvm volume group name, lxc by default"
|
||||||
echo "lvprefix" : lvm volume name prefix, none by default, e.g. --lvprefix=lxc_ then new lxc lv name will be lxc_newname"
|
echo "lvprefix : lvm volume name prefix, none by default, e.g. --lvprefix=lxc_ then new lxc lv name will be lxc_newname"
|
||||||
echo "fstype" : new container file system type, ext3 by default (only works for non-snapshot lvm)"
|
echo "fstype : new container file system type, ext3 by default (only works for non-snapshot lvm)"
|
||||||
}
|
}
|
||||||
|
|
||||||
shortoptions='ho:n:sL:v:p:t:'
|
shortoptions='ho:n:sL:v:p:t:'
|
||||||
@ -174,6 +174,8 @@ mounted=0
|
|||||||
lxc-info -s -n $lxc_orig|grep RUNNING >/dev/null 2>&1
|
lxc-info -s -n $lxc_orig|grep RUNNING >/dev/null 2>&1
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
container_running=True
|
container_running=True
|
||||||
|
else
|
||||||
|
container_running=False
|
||||||
fi
|
fi
|
||||||
sed -i '/lxc.rootfs/d' $lxc_path/$lxc_new/config
|
sed -i '/lxc.rootfs/d' $lxc_path/$lxc_new/config
|
||||||
oldroot=`grep lxc.rootfs $lxc_path/$lxc_orig/config | awk -F= '{ print $2 '}`
|
oldroot=`grep lxc.rootfs $lxc_path/$lxc_orig/config | awk -F= '{ print $2 '}`
|
||||||
|
Loading…
Reference in New Issue
Block a user