Commit 078273d5 by dlezcano

Make the script to call itself.

From: Daniel Lezcano <dlezcano@fr.ibm.com> Make the script to call itself, so we can unshare the mount points safely, they will be automatically unmounted when the command finish. Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 633cb02a
......@@ -3,6 +3,7 @@
prefix=@prefix@
lxcpath=@localstatedir@/lxc
exec=""
if [ ! -r $lxcpath ]; then
exit 0
......@@ -17,9 +18,15 @@ for i in $*; do
case $i in
-n)
name=$2; shift 2;;
--exec)
exec="exec"; shift;;
esac
done
if [ -z "$exec" ]; then
exec @bindir@/lxc-unshare -m -- @bindir@/lxc-netstat -n $name --exec $*
fi
if [ -z "$name" ]; then
echo "usage: $0 -n <name>"
exit 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment