#!/bin/sh

. /opt/etc/globals

# $lockfile is a lock preventing recursion of heartbeat script.
# Since /tmp is memory-mapped, there can be no such file at the
# moment, but perform the cleanup anyway.

$rm -f $lockfile > /dev/null 2>&1

# The Algorithm. It is genious!
# Step 1. Screw things up a bit (do not do complete 'route flush' here).
$route delete default > /dev/null 2>&1
# Step 2. Then fix.
/opt/etc/heartbeat.sh
