support alternate container path in lxc-shutdown

Signed-off-by: Harald Dunkel <harald.dunkel@aixigo.de>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
lxc-create: add missing -P option for running lxc-destroy

Signed-off-by: Harald Dunkel <harald.dunkel@aixigo.de>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
support alternate container path in lxc-netstat.in

Signed-off-by: Harald Dunkel <harald.dunkel@aixigo.de>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
coverity: fix dereference NULL return value

also break once we have found root, no need to search the rest of the mounts

Changelog: May 6: Serge: don't add the break.  (see m-l)

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
coverity: free malloc'ed memory in error case

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
coverity: open can return 0 as an fd, change error check to < 0

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
coverity: condition already checked for

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
coverity: clonetest: check correct container is cloned

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
coverity: check return from waitpid

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
coverity: fix potential dereference NULL returned from malloc

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
conf.c: remove a break

commit ab81cef05338e7a553aacca141287034d6daf167 meant to remove the
added break, but apparently i had not done 'git add' before commit
--amend.  Remove the added break.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
lxc-ps: handle cgroup collisions

A few months ago cgroup handling in lxc was updated so that if
/sys/fs/cgroup/$cgroup/lxc/$container already exists (most often
due to another container by the same name under a different lxcpath),
then /sys/fs/cgroup/$cgroup/lxc/${container}-N would be used.

lxc-ps was never updated to handle this.  Fix that.

(Note, the ns cgroup is being special cased there, but I don't
really believe ns cgroup works any more.)

It would be preferable to rewrite lxc-ps in python or in C, but
this at least makes the basic lxc-ps work in the case of multiple
containers with the same name.

Changelog:
	fix missing fi.
	replace 'z1' with '$container' as pointed out by Christian

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
lxc-monitor multiple paths

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
lxc-shutdown: fix lxc_path variable

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>