diff options
author | Scott Moser <smoser@ubuntu.com> | 2009-12-16 15:03:21 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2009-12-16 15:03:21 -0500 |
commit | 038a9bf8c340c05599727591376cfba7585ea6b2 (patch) | |
tree | c98de134d4a7e0128c14dd65e8076fb520be9922 /ec2init-disable.conf | |
parent | cf74dcfe039e935c0f30a6dd542d28ae2e62cc30 (diff) | |
download | vyos-cloud-init-038a9bf8c340c05599727591376cfba7585ea6b2.tar.gz vyos-cloud-init-038a9bf8c340c05599727591376cfba7585ea6b2.zip |
add current working ec2init.conf, save ec2init.conf.goal, add disabler
I'm saving ec2init.conf.goal off as the goal. At some point in the
future that should be functional.
ec2init-disable.conf is present as a debugging tool. If boot hangs
due to unsatisfiable conditions in start-on for ec2init.conf, this will
disable ec2init.conf so a reboot will come up ec2init.conf running.
Diffstat (limited to 'ec2init-disable.conf')
-rw-r--r-- | ec2init-disable.conf | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ec2init-disable.conf b/ec2init-disable.conf new file mode 100644 index 00000000..b9d57f06 --- /dev/null +++ b/ec2init-disable.conf @@ -0,0 +1,24 @@ +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 + |