X-Git-Url: http://git.onelab.eu/?p=vsys-scripts.git;a=blobdiff_plain;f=root-context%2Fexec%2Fsliceip;fp=root-context%2Fexec%2Fsliceip;h=3757989182b321340ef7cdc2c590235dcfefd90e;hp=0000000000000000000000000000000000000000;hb=df194146ab022e576b930479eb5f1a0124a67e20;hpb=b8e5fe197afcbfce4efeb80bc147280efcc49308;ds=sidebyside 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 "$@"