# -*- mode: conf; -*-

start on node_fork_server-ready

# Make sure variables from early boot are passed through to this job
env EARLY_BOOT_START
env EARLY_BOOT_PID
env EARLY_BOOT_STOP

script
	# Record upstart timings, for boot performance tracking
	mkdir -p /tmp/misc-props
	echo -n $EARLY_BOOT_PID > /tmp/misc-props/pids.early_start
	echo -n $EARLY_BOOT_START > /tmp/misc-props/timing.early_start
	echo -n $EARLY_BOOT_STOP > /tmp/misc-props/timing.early_stop
	echo -n $UPSTART_STARTTIME > /tmp/misc-props/timing.upstart_begin
	echo -n $$ > /tmp/misc-props/pids.upstart_finish
	echo -n `date -U` > /tmp/misc-props/timing.upstart_finish

    # generate mark identifying this boot
    [ -x /etc/init.d/bootmark.sh ] && /etc/init.d/bootmark.sh start
end script
