-#!/bin/bash
+#!/bin/bash -l
set -eE -o pipefail
trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
ip=$(host demohost | sed -rn 's/^\S+ has address //p;T;q')/32
-cedit demohost /etc/exports <<EOF
+cedit demohost /etc/exports <<EOF || exportfs -ra
/a $ip(async,rw,no_subtree_check,no_root_squash)
/q $ip(async,rw,no_subtree_check,no_root_squash)
EOF
-exportfs -ra
+
ssh root@demohost bash -s <<'EOFOUTER'
set -eE -o pipefail
case $distro in
- debian) pi curl;;
+ debian|trisquel|ubuntu) pi curl;;
arch) : ;;
# fedora: unknown
esac
case $distro in
debian)
- pi task-cinnamon-desktop
+ pi task-mate-desktop
# in settings, change scrolling to two-finger,
# because the default edge scroll doesn\'t work.
pu transmission-gtk
# so we don't hold open the /a fs
sudo rsync -r --delete /a/opt/gnirehtet /opt
cd /opt/gnirehtet
-./gnirehtet rt &>/tmp/rt &
+
+# just running it in foreground so it's easier to kill etc.
+./gnirehtet rt
+
+
# note, to kill it, you need to also kill
# lsof -i tcp:31416
# and maybe unplug adb cable
# note, ping results in log message: dropping invalid packet
-tail -F /tmp/rt ||:
+
+#./gnirehtet rt &>/tmp/rt &
+
+#tail -F /tmp/rt ||: