Description: lxc-ls: prepend container name with -- when calling ls
 Otherwise a container name with a dash confuses ls
Author: Serge Hallyn <serge.hallyn@ubuntu.com>
Forwarded: yes
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1006332

Index: lxc-0.8.0~rc1/src/lxc/lxc-ls.in
===================================================================
--- lxc-0.8.0~rc1.orig/src/lxc/lxc-ls.in	2012-06-11 15:53:55.620963177 +0000
+++ lxc-0.8.0~rc1/src/lxc/lxc-ls.in	2012-06-11 15:55:54.205526460 +0000
@@ -23,7 +23,7 @@
 	mount_point=`echo "$mount_string" |cut -d' ' -f2`;
 }
 
-ls "$@" $lxcpath
+ls "$@" -- $lxcpath
 
 active=$(netstat -xl 2>/dev/null | grep $lxcpath | \
 	sed -e 's#.*'"$lxcpath/"'\(.*\)/command#\1#');
@@ -34,6 +34,6 @@
 		# get cgroup for init
 		init_cgroup=`cat /proc/1/cgroup | awk -F: '{ print $3 }' | head -1`
 		cd $mount_point/$init_cgroup/lxc
-		ls "$@" -d $active
+		ls "$@" -d -- $active
 	fi
 fi
