File: //etc.defaults/init/smallupdate.conf
description "DDSM smallupdate restore from share"
start on stopped dsmupdate
task
console log
script
smallUpdateDir="/smallupd@te"
smallUpdater="${smallUpdateDir}/smallupd@ter"
configUpdater="${smallUpdateDir}/configupdate"
if [ ! -d "$smallUpdateDir" ]; then
exit 0
fi
if [ -x "${configUpdater}" ]; then
/bin/echo "Perform config update for smallupdate" || true
if ! ${configUpdater} -c all -p /etc.defaults/VERSION; then
/bin/echo "Failed to update config for smallupdate" || true
/bin/rm -rf "${smallUpdateDir}" || true
exit 0
fi
fi
if [ -x "$smallUpdater" ]; then
/bin/date -u
$smallUpdater -t || true
fi
/bin/rm -rf "${smallUpdateDir}" || true
/bin/touch /var/.SmallupdateBootup || true
end script
# vim:ft=upstart