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