1
0
This repository has been archived on 2025-01-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Anderson Luiz Alves 0464e230c1 stock 103961
2017-07-30 16:48:04 -03:00

28 lines
604 B
Bash
Executable File

#!/bin/sh
# /etc/bewan/scripts/ip-down-dhcp
# called when DHCP client looses its IP address
# setparam is already included by calling script
# Environnement variables:
# IFNAME: interface name
main_ip_down_dhcp() {
base_log "$SCRIPTD/ip-down-dhcp $IFNAME" debug
rm -f "$INTFD/$IFNAME/dhcp-up"
# Down LAN interface
if [ -f "$INTFD/$IFNAME/lanid" ]; then
local LANID=`cat $INTFD/$IFNAME/lanid`
base_call_scripts 'ip-down-lan'
# Down WAN interface
elif [ -f "$INTFD/$IFNAME/wanid" ]; then
local WANID=`cat $INTFD/$IFNAME/wanid`
base_call_scripts 'ip-down'
fi
}
main_ip_down_dhcp