#!/bin/busybox sh rest10() { # Let the user read machine_info and other usefull informations on console (or skip with Enter) sfx_question ; read -t10 -p 'Press Enter or wait 10 sec...' # Make some blank lines on console echo -e '\n\n\n\n\n' } # Define some handy variables imagedir=/mnt/nfs/images scriptdir=/mnt/nfs/scripts/ hostname=$(hostname) # Load helper functions source $scriptdir/funcs.sh # Load some autorun.sh specific helper functions source /etc/rc.d/funcs # Reload init help 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 rest10 ; source $scriptdir/image_deploy.sh else scriptavailability_test image_capture_${hostname}.sh || exit 3 # Start capture script if all it needs is available rest10 ; source $scriptdir/image_capture.sh fi