[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#531003: tunnel does not survive suspend



Hi,

I, the new package maintainer, wrote a script to be placed in
/etc/pm/sleep.d.

I would be pleased if you could test the script in combination with
suspend. Of course I tested the script itself but not after a suspend.
My installation is not able to suspend at the moment.

Could you also confirm that 60* is the right place.

Thanks in advance.

Best regards,

Reinier Haasjes
#!/bin/sh
# Restart aiccu if connection is down

CONFIG=/etc/aiccu.conf
BINARY=/usr/sbin/aiccu
P6=/bin/ping6

#. "${PM_FUNCTIONS}"

[ -x $BINARY ] || exit $NA
[ -f $CONFIG ] || exit $NA

function ping_root() {
	[ -x $P6 ] || return 127

	# Get aiccu ipv6_interface
	INT=$(grep ^ipv6_interface $CONFIG | cut -d" " -f 2)

	# Ping f.root-servers.net (Internet Systems Consortium; distributed using anycast)
	$P6 -I $INT -c 1 f.root-servers.net >/dev/null 2>&1
	return $?
}

function check_aiccu() {
	# Restart aiccu if ping fails
	ping_root || /etc/init.d/aiccu restart >/dev/null
}

case "$1" in
	hibernate|suspend)
		# Do nothing
		;;
	thaw|resume) 
		check_aiccu
		;;
	*) exit $NA
		;;
esac

Reply to: