35 lines
759 B
Bash
Executable File
35 lines
759 B
Bash
Executable File
#!/bin/sh
|
|
# /etc/bewan/scripts/ip-down6-autoconf
|
|
# called when autoconfd thinks we lost IPv6 connectivity
|
|
|
|
# Environnement variables:
|
|
|
|
# IFNAME: interface name
|
|
|
|
. /etc/bewan/scripts/globals
|
|
. /etc/bewan/lib/base
|
|
|
|
base_log "$SCRIPTD/ip-down6-autoconf $IFNAME" debug
|
|
|
|
# Take wan-up-down mutex
|
|
base_enter_critical 'wan-up-down'
|
|
|
|
# Get config parameters after taking lock
|
|
base_call_initd 'setparam'
|
|
|
|
rm -f "$INTFD/$IFNAME/autoconf-up6"
|
|
|
|
# Down LAN interface
|
|
if [ -f "$INTFD/$IFNAME/lanid" ]; then
|
|
LANID=`cat $INTFD/$IFNAME/lanid`
|
|
base_call_scripts 'ip-down6-lan'
|
|
|
|
# Down WAN interface
|
|
elif [ -f "$INTFD/$IFNAME/wanid" ]; then
|
|
WANID=`cat $INTFD/$IFNAME/wanid`
|
|
base_call_scripts 'ip-down6'
|
|
fi
|
|
|
|
# Release wan-up-down mutex
|
|
base_exit_critical 'wan-up-down'
|