[libvirt] [libvirt-sandbox][PATCH] Sync lxc-enter-namespace options with libvirt
Alex Jia
ajia at redhat.com
Thu Mar 28 08:48:31 UTC 2013
The option 'nolabel' has been changed by current libvirt upstream, it should
be 'noseclabel' now, so need to sync the option change with libvirt.
# ./tools/virsh -c lxc:/// lxc-enter-namespace --help | grep label
lxc-enter-namespace <domain> [--noseclabel] {[--cmd] <string>}...
--noseclabel Do not change process security label
Signed-off-by: Alex Jia <ajia at redhat.com>
---
bin/virt-sandbox-service | 6 +++---
bin/virt-sandbox-service-bash-completion.sh | 2 +-
bin/virt-sandbox-service-execute.pod | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service
index c05e13f..478769d 100755
--- a/bin/virt-sandbox-service
+++ b/bin/virt-sandbox-service
@@ -838,8 +838,8 @@ def fullpath(cmd):
def execute(args):
myexec = [ "virsh", "-c", "lxc:///", "lxc-enter-namespace" ]
# myexec = [ "virt-sandbox-service-util", "execute" ]
- if args.nolabel:
- myexec.append("--nolabel")
+ if args.noseclabel:
+ myexec.append("--noseclabel")
myexec.extend([ args.name, "--", fullpath(args.command[0])] + args.command[1:])
os.execv("/usr/bin/virsh", myexec)
# myexec.extend( "-e", cmd, args.name ]
@@ -966,7 +966,7 @@ def gen_connect_args(subparser):
def gen_execute_args(subparser):
parser = subparser.add_parser("execute",
help=("Execute a command within a sandbox container"))
- parser.add_argument("-N", "--nolabel", dest="nolabel",
+ parser.add_argument("-N", "--noseclabel", dest="noseclabel",
default=False, action="store_true",
help=_("do not modify the label of the executable process. By default all commands execute with the label of the sandbox"))
requires_name(parser)
diff --git a/bin/virt-sandbox-service-bash-completion.sh b/bin/virt-sandbox-service-bash-completion.sh
index a886cf4..c855fd2 100755
--- a/bin/virt-sandbox-service-bash-completion.sh
+++ b/bin/virt-sandbox-service-bash-completion.sh
@@ -57,7 +57,7 @@ _virt_sandbox_service () {
[ALL]='-h --help'
[CREATE]='-u --unitfile -p --path -t --type -l --level -d --dynamic -n --clone -i --image -s --size'
[LIST]='-r --running'
- [EXECUTE]='-N --nolabel'
+ [EXECUTE]='-N --noseclabel'
)
for ((i=0; $i <= $COMP_CWORD; i++)); do
diff --git a/bin/virt-sandbox-service-execute.pod b/bin/virt-sandbox-service-execute.pod
index 46a3b2b..f79ce73 100644
--- a/bin/virt-sandbox-service-execute.pod
+++ b/bin/virt-sandbox-service-execute.pod
@@ -31,7 +31,7 @@ Display help message
The connection URI for the hypervisor (only LXC or QEMU are
supported currently).
-=item B<-N>, B<--nolabel>
+=item B<-N>, B<--noseclabel>
Execute command within the container.
--
1.7.1
More information about the libvir-list
mailing list