From: Thierry Parmentelat Date: Tue, 9 Jul 2013 13:26:19 +0000 (+0200) Subject: first rough untested wrapper around sliceip.{vs,lxc} X-Git-Tag: vsys-scripts-0.95-48~3 X-Git-Url: http://git.onelab.eu/?p=vsys-scripts.git;a=commitdiff_plain;h=df194146ab022e576b930479eb5f1a0124a67e20 first rough untested wrapper around sliceip.{vs,lxc} --- diff --git a/root-context/exec/sliceip b/root-context/exec/sliceip new file mode 100755 index 0000000..3757989 --- /dev/null +++ b/root-context/exec/sliceip @@ -0,0 +1,17 @@ +#!/bin/bash +# +# relying on nodemanager to create this file +virtfile=/etc/planetlab/virt +# if not existent or corrupted, we will assume vs +virt=vs +if [ -f $virtfile ] ; then + case $(cat $virtfile) in + vs) virt=vs;; + lxc) virt=lxc;; + esac +fi + +# try to avoid depending on PATH +virt_command=$(dirname $0)/sliceip.$virt + +exec $virt_command "$@"