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
883 B
Bash
Executable File

#!/bin/sh
# /etc/bewan/scripts/ip-up6-lan
# included in /etc/bewan/scripts/ip-up6-dhcp
# environment variables are defined in the calling script
# setparam is already included by calling script
# LAN network interface is up
# called when DHCP client gets an IP address
# also called by /etc/bewan/init.d/lanip6 with static IP address
# Save parameters
IFDIR=$LAND/$LANID/ip6
if [ -d "$IFDIR" ]; then
echo $IPADDR >$IFDIR/ipaddr
[ "$PREFIX" != '' ] && echo $PREFIX>$IFDIR/prefix
[ "$ROUTERS" != '' ] && echo $ROUTERS >$IFDIR/routers
[ "$SERVERS" != '' ] && echo $SERVERS >$IFDIR/servers
fi
# Include scripts found in /etc/bewan/ip-up6-lan.d directory
trap base_reboot_on_exit EXIT
for script in `find /etc/bewan/ip-up6-lan.d -follow -type f | sort`; do
base_log "$script $LANID" debug
. $script $LANID
done
trap '' EXIT
[ ! -f $RCRUNNING ] && base_call_initd 'inittab'