#!/bin/sh

. /scripts/functions

handler() {
	if [ ! -e /sys/power/resume ]; then
		message "Kernel does not support resume - doing normal boot"
		return 0
	fi

	# hardcode path, uswsusp ships an resume binary too
	/bin/resume "$INIT_RESUME"
	return 0
}

for e in "$handler_eventdir"/resume.*; do
	# Ignore the return code to continue normal boot
	( . "$e"; handler; ) ||:
	done_event "$e"
done
