3 # parameters: $1 and environment
6 # init: zcip starts. Environment:
9 # config: Address is obtained.
13 # deconfig: Conflict or link went down.
17 file_ipconf="$service.ipconf"
18 dir_ipconf="/var/run/service/fw"
21 #exec >>"$0.out" #debug
24 echo "`date`: Params: $*"
26 if test x"$1" != x"config"; then
27 # Reconfigure network with this interface disabled
30 rm "$dir_ipconf/$file_ipconf"
35 # "config": we've got the address
36 # Record information for e.g. dhcp_$IF_pinger service
39 ./convert2ipconf "$file_ipconf"
40 # Reconfigure routing and firewall if needed
41 diff --brief "$file_ipconf" "$dir_ipconf/$file_ipconf" >/dev/null 2>&1
43 echo "Reconfiguring fw"
44 mkdir -p "$dir_ipconf" 2>/dev/null
45 cp "$file_ipconf" "$dir_ipconf/$file_ipconf"