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.7.5/src/lxc/lxc-ls.in
===================================================================
--- lxc-0.7.5.orig/src/lxc/lxc-ls.in	2012-06-11 21:04:05.988251420 +0000
+++ lxc-0.7.5/src/lxc/lxc-ls.in	2012-06-11 21:04:14.300250001 +0000
@@ -22,7 +22,7 @@
 	mount_point=`echo "$mount_string" |cut -d' ' -f2`;
 }
 
-ls "$@" $lxcpath
+ls "$@" -- $lxcpath
 
 active=$(netstat -xa 2>/dev/null | grep $lxcpath | \
 	sed -e 's#.*'"$lxcpath/"'\(.*\)/command#\1#');
@@ -33,6 +33,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
