2
# Script to dispatch NetworkManager events
4
# Starts firestarter when NetworkManager fiddles with interfaces.
7
echo "$0: called with no interface" 1>&2
11
# Check whether firestarter is configured or not
12
FS_CONFIG=/etc/firestarter/configuration
14
if [ ! -e $FS_CONFIG ]; then
15
echo "$0: firestarter configuration not found" 1>&2
21
# Check whether this interface is defined as protected in firestarter config
22
if [ "$1" != "$IF" ]; then
23
echo "$0: $1 not protected by firestarter" 1>&2
27
# Check the current status of firestarter
29
if [ -e /var/lock/subsys/firestarter ] || [ -e /var/lock/firestarter ]; then
35
if [ "$FS_STATUS" -gt 0 ]; then
36
/etc/init.d/firestarter start;
40
if [ "$FS_STATUS" -eq 0 ]; then
41
/etc/init.d/firestarter stop;
49
echo "$0: called with unknown action \`$2'" 1>&2