ansible/roles/openqa/worker/files/ifup-pre-local
Adam Williamson 9ce401e74d use an ifup-pre-local for tap device creation
holy crap, this is some ancient magic.
2016-04-27 15:46:13 -07:00

9 lines
241 B
Bash

#!/bin/sh
# if the interface being brought up is tap[n], create
# the tap device first
if=$(echo "$1" | sed -e 's,ifcfg-,,')
tap=$(echo "$if" | sed -e 's,[0-9]\+$,,')
if [ "$tap" == "tap" ]; then
tunctl -u _openqa-worker -p -t "$if"
fi