script_dir=$(dirname $(readlink -f "$BASH_SOURCE"))
if [[ $script_dir == /a/bin/* ]]; then
- rm -rf /a/tmp/fai2
+ # Copy our script elsewhere so we can develop it
+ # and save it at the same time it's running
+ rm -rf /tmp/faifreeze
mkdir -p /a/tmp
- cp -ar /a/bin/fai /a/tmp/fai2
- exec /a/tmp/fai2/${BASH_SOURCE##*/} "$@"
+ cp -ar /a/bin/fai /tmp/faifreeze
+ exec /tmp/faifreeze/${BASH_SOURCE##*/} "$@"
fi
cd $script_dir
# via osinfo-query os. guessing arch is closest to latest fedora.
variant=fedora22
else
- ./pxe-server fai &
+ ./pxe-server -a fai &
sleep 2
if $redeploy; then
./fai-redep
# uniq is to stop gtk-warning spam
s virt-install --os-variant $variant -n $name --pxe -r 2048 --vcpus 1 \
${disk_arg[*]} -w bridge=br0,mac=52:54:00:9c:ef:ad \
- --graphics spice,listen=0.0.0.0 $console_arg |& grep -v '^$' | uniq &
+ --graphics spice,listen=0.0.0.0 $console_arg |& grep -v '^ *$' | uniq &
if [[ $SSH_CLIENT ]]; then
fg