#!/bin/sh
# restore the firewall to its previous state

TEMPDIR=/tmp/beezix
OPEN_SCRIPT=firewall-open

# wait for enter key then exit w/good status
goodexit ()
{
    echo
    echo "Smite the enter key to continue."
    read
    echo
    exit 0
}

# wait for enter key then exit w/bad status
badexit ()
{
    echo
    echo "Whack the enter key to continue."
    read
    echo
    exit 1
}

cat <<DOC_HERE

Restoring the firewall to its pre "$OPEN_SCRIPT"
state.  Moving hosts.allow and hosts.deny back
to /etc/ and restarting the network.  User "knoppix"
will still have the new password.

DOC_HERE

sudo mv $TEMPDIR/hosts.* /etc/
sudo /etc/init.d/inetd restart

echo
echo "Done."

goodexit