[lxc-devel] Command line syntax of utilities
Daniel Lezcano
daniel.lezcano at free.fr
Fri Jul 17 20:50:02 UTC 2009
Adam Majer wrote:
> Hello,
>
> Is there any particular reason that ALL command line utilities that take
> a container name as a required parameter, take it as part of the -n
> parameter?
That is to make explicit the parameter name and to facilitate the
parsing of the command line with getopt.
> Can this be simplified to work without the -n?
> For example,
>
> lxc-info -n container
>
> vs.
>
> lxc-info container
>
> and [-n] becomes an implied parameter for backward compatibility.
In some cases, the parsing of the command will be tricky:
lxc-start -n debian /sbin/myinit
=>
lxc-start debian /sbin/myinit
lxc-execute -n foo /bin/bash
=>
lxc-execute foo /bin/bash
lxc-cgroup -n foo cpuset.cpus 1
=>
lxc-cgroup foo cpuset.cpus 1
> Would patches for this be accepted?
Yes I think so, with the -n option for backward compatibility (until the
1.0.0 version is reached).
If you send the patches I will merge them after the 0.6.3 is out because
I am consolidating this version right now.
Thanks
-- Daniel
More information about the lxc-devel
mailing list