X-Git-Url: https://piware.de/gitweb/?p=talk-cockpit-auth-anywhere.git;a=blobdiff_plain;f=demo.sh;fp=demo.sh;h=b63f4d915f2dc361e800e18ddb6262210e4a647a;hp=0000000000000000000000000000000000000000;hb=bd259fb46d536be10a3d15210676f7b122427fa7;hpb=de39e759eae43a9fe346d886ffd9163915a85290 diff --git a/demo.sh b/demo.sh new file mode 100755 index 0000000..b63f4d9 --- /dev/null +++ b/demo.sh @@ -0,0 +1,87 @@ +#!/bin/sh +# Run this script before starting the presention/demo. +# Before you must run "make download". +set -ex + +# specific for Martin Pitt +VM_PREFIX="toolbox run -c devel" + +printf '[Session]\nIdleTimeout=0\n' | sudo tee /etc/cockpit.cockpit.conf +sudo systemctl stop cockpit + +echo '127.0.0.2 cockpit.dev' | sudo tee -a /etc/hosts + +# LV resizing demo +sudo modprobe scsi_debug dev_size_mb=512 +# sanity check +m=$(cat /sys/block/sdb/device/model) +[ "${m%% *}" = scsi_debug ] + +cat < /tmp/r7vm & +echo $! > /tmp/r7vm.pid + +read ssh_cmd < /tmp/r7vm +echo "ssh command: $ssh_cmd" +read _ < /tmp/r7vm # URL, uninteresting +read running < /tmp/r7vm +[ "${running#RUNNING}" != "$running" ] # sanity check +rm /tmp/r7vm + +$ssh_cmd hostnamectl set-hostname server1 +sleep infinity +' & +R7VM_PID=$! + +sleep 20 # let the above VM initialize + +# Windows demo +xhost +local: # allow X in toolbox +cat <