start on startup normal exit 0 1 console output script set +e i=0 while ! touch /etc/TEST >/dev/null 2>&1; do echo "DISABLER: waiting for writable /" sleep 1 i=$(($i+1)) [ $i -lt 30 ] || { echo "DISABLER: bailing"; exit 0; } done f="/etc/init/ec2init.conf" [ -e "$f" ] || { echo "DISABLER: no ${f}, exiting"; exit 0; } echo "DISABLER: sleeping 5, then disabling ${f}" sleep 5 mv "${f}" "${f}.disabled" && echo "DISABLER: disabled ${f}" || echo "DISABLER: failed mv ${f} ${f}.disabled" exit 0 end script