%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /backups/router/usr/local/etc/rc.d/
Upload File :
Create Path :
Current File : //backups/router/usr/local/etc/rc.d/choparp

#!/bin/sh

# PROVIDE: choparp
# REQUIRE: LOGIN
#
choparp_enable=${choparp_enable-"NO"}
choparp_iface=${choparp_iface-}
choparp_macaddr=${choparp_macaddr-"auto"}
choparp_network=${choparp_network-}

. /etc/rc.subr

name="choparp"
rcvar=choparp_enable
start_precmd="choparp_precmd"
restart_precmd="choparp_precmd"

load_rc_config ${name}

choparp_precmd () {
	if [ -z "${choparp_iface}"   \
	  -o -z "${choparp_macaddr}" \
	  -o -z "${choparp_network}" ]; then
		warn "set choparp_iface, choparp_macaddr and choparp_network."
		return 1
	fi
}

command="/usr/local/sbin/${name}"
command_args="${choparp_iface} ${choparp_macaddr} ${choparp_network}"

run_rc_command "$1"

Zerion Mini Shell 1.0