3757989182b321340ef7cdc2c590235dcfefd90e
[vsys-scripts.git] / root-context / exec / sliceip
1 #!/bin/bash
2 #
3 # relying on nodemanager to create this file
4 virtfile=/etc/planetlab/virt
5 # if not existent or corrupted, we will assume vs
6 virt=vs
7 if [ -f $virtfile ] ; then
8     case $(cat $virtfile) in
9         vs) virt=vs;;
10         lxc) virt=lxc;;
11     esac
12 fi
13
14 # try to avoid depending on PATH
15 virt_command=$(dirname $0)/sliceip.$virt
16
17 exec $virt_command "$@"