From 8142ffde3037976e152711f902ad9622aa1b7cba Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Sun, 22 Oct 2017 13:31:10 +0200 Subject: hours of polishing tmux, script sequences, hinting. ^C abort in tmux is broken. --- nfs/nfs-autorun.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 nfs/nfs-autorun.sh (limited to 'nfs/nfs-autorun.sh') diff --git a/nfs/nfs-autorun.sh b/nfs/nfs-autorun.sh new file mode 100755 index 0000000..b2be8b2 --- /dev/null +++ b/nfs/nfs-autorun.sh @@ -0,0 +1,23 @@ +#!/bin/busybox sh + +# Define some handy variables +imagedir=/mnt/nfs/images +scriptdir=/mnt/nfs/scripts/ +hostname=$(hostname) + +# Load helper functions +source $scriptdir/funcs.sh # Load some nfs-autorun.sh specific helper functions + +# Check all prerequisites and exit if it fail +hostname_test || exit 1 +firstdisk_test || exit 2 + +# Run the main action script +if nfswrite_test +then # Start deploy script after letting a chance to cancel it + pause10s ; source $scriptdir/image_deploy.sh + +else scriptavailability_test image_capture_${hostname}.sh || exit 3 + # Start capture script if all it needs is available + pause10s ; source $scriptdir/image_capture.sh +fi -- cgit v1.2.3