Annotation of /trunk/mkinitrd-magellan/busybox/examples/var_service/dhcp_if_pinger/run
Parent Directory | Revision Log
Revision 984 -
(hide annotations)
(download)
Sun May 30 11:32:42 2010 UTC (14 years ago) by niro
File size: 571 byte(s)
Sun May 30 11:32:42 2010 UTC (14 years ago) by niro
File size: 571 byte(s)
-updated to busybox-1.16.1 and enabled blkid/uuid support in default config
1 | niro | 984 | #!/bin/sh |
2 | |||
3 | delay=67 | ||
4 | |||
5 | if=${PWD##*/dhcp_} | ||
6 | if=${if%%_pinger} | ||
7 | |||
8 | if test -f "$0.log"; then | ||
9 | tail -999 "$0.log" >"$0.log.new" | ||
10 | mv "$0.log.new" "$0.log" | ||
11 | fi | ||
12 | |||
13 | test -f "/var/service/dhcp_$if/dhcp_$if.out" || exec env - sleep "$delay" | ||
14 | . "/var/service/dhcp_$if/dhcp_$if.out" | ||
15 | test x"$router" != x"" || exec env - sleep "$delay" | ||
16 | |||
17 | #echo "`date '+%Y-%m-%d %H:%M:%S'` Testing ping -c3 $router" >>"$0.log" | ||
18 | ping -c3 "$router" && exec env - sleep "$delay" | ||
19 | |||
20 | echo "`date '+%Y-%m-%d %H:%M:%S'` Restarting /var/service/dhcp_$if" >>"$0.log" | ||
21 | sv t "/var/service/dhcp_$if" | ||
22 | |||
23 | exec env - sleep "$delay" |
Properties
Name | Value |
---|---|
svn:executable | * |