This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
DEVICE=$1 | |
ACTION=$2 | |
#if [[ $DEVICE = "eth1" && $ACTION = "up" ]] ; then | |
if [[ $ACTION = "up" ]]; then | |
MYNAME=$(echo $0 | awk -F '/' '{print $NF}') | |
WORKDIR=$(mktemp -d /var/tmp/${MYNAME}XXXX) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Derives from: http://giovannitorres.me/create-a-linux-lab-on-kvm-using-cloud-images.html | |
## Assumes you have a xenial cloud image in $DIR below, via e.g. | |
# wget https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img | |
# Take one argument from the commandline: VM name | |
if ! [ $# -eq 1 ]; then | |
echo "Usage: $0 <node-name>" |