#!/bin/bash #### VARIABILI SCRIPTNAME=`echo $0 | awk -vFS='/' '{print $NF}'` #EXEC=/hosthome${PWD#$HOME}${0#'.'} waitfinish() { SEMAPHORE=$1.booting touch $SEMAPHORE while [ -f $SEMAPHORE ]; do sleep 2 done sleep 5 } notifyfinish() { rm $1.booting } startvm() { X="--new --exec=/hosthome${PWD#$HOME}/${SCRIPTNAME}" if [ -e r_1-pc1.disk ] ; then echo "$0: some .disk file exists in this directory!" echo " launch "$0 crash" first" exit 1 fi vstart r_1-pc1 --eth0=C0 $X waitfinish r_1-pc1 echo '' echo ' *** all machines started ***' } crashvm() { vcrash r_1-pc1 } make_ripd_file() { cat > /etc/zebra/ripd.conf << EOF ! hostname ripd password root enable password root ! log file /var(log/zebra/ripd.log !ricorda che questa è una prova... EOF } make_zebra_daemon_file() { cat > /etc/zebra/daemons < /etc/zebra/zebra.conf <