From df194146ab022e576b930479eb5f1a0124a67e20 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 9 Jul 2013 15:26:19 +0200 Subject: [PATCH] first rough untested wrapper around sliceip.{vs,lxc} --- root-context/exec/sliceip | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 root-context/exec/sliceip 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 "$@" -- 2.43.0