source:
hybrid/branches/releng-9/nanobsd/files/etc/rc.d/iperf
| Last change on this file was 12334, checked in by , 12 years ago | |
|---|---|
|
|
| File size: 640 bytes | |
| Rev | Line | |
|---|---|---|
| [10422] | 1 | #!/bin/sh |
| 2 | # | |
| [12334] | 3 | # PROVIDE: iperf |
| 4 | # BEFORE: DAEMON | |
| [10422] | 5 | # KEYWORD: shutdown |
| 6 | # | |
| [12334] | 7 | # Add the following line to /etc/rc.conf to enable iperf in server mode: |
| [10422] | 8 | # |
| [12334] | 9 | # iperf_enable="YES" |
| [10422] | 10 | # |
| [12334] | 11 | . /etc/rc.subr |
| [10422] | 12 | |
| [12334] | 13 | name=iperf |
| 14 | rcvar=`set_rcvar` | |
| [10422] | 15 | |
| [12334] | 16 | #command=/usr/local/bin/iperf |
| 17 | #command_args="-s -D" | |
| [10422] | 18 | |
| [12334] | 19 | load_rc_config ${name} |
| [10422] | 20 | |
| [12334] | 21 | iperf_enable=${iperf_enable-"NO"} |
| [10422] | 22 | |
| [12334] | 23 | #### |
| 24 | # iperf does not generate a pid file | |
| 25 | # iperf_pidfile=${iperf_pidfile-"/var/run/.pid"} | |
| 26 | # pidfile="${iperf_pidfile}" | |
| [10422] | 27 | |
| [12334] | 28 | # Quick to start iperf in deamon mode and make sure logfiles get writting in |
| 29 | # parseable way | |
| 30 | start_cmd="sh -c 'iperf -s -D -y c 1>>/var/log/iperf.log 2>>/var/log/iperf.log'" | |
| [10422] | 31 | |
| 32 | run_rc_command "$1" |
Note:
See TracBrowser
for help on using the repository browser.
