Add several important startup services
This commit is contained in:
Executable
+42
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: fib_setup
|
||||
# BEFORE: sysctl
|
||||
#
|
||||
|
||||
. ${RC_ROUTER_HARNESS}/etc/rc.subr
|
||||
|
||||
name="fib_setup"
|
||||
desc="Calculate and respect the fib count"
|
||||
|
||||
start_cmd='fib_setup_start'
|
||||
stop_cmd='fib_setup_stop'
|
||||
rcvar='fib_setup_enable'
|
||||
|
||||
load_rc_config 'fib_setup'
|
||||
|
||||
fib_setup_start()
|
||||
{
|
||||
echo "Running fib_setup"
|
||||
fib_count=$(( ${rc_router_fibs} ))
|
||||
max_fibs=$(( ${fib_count} + 1 ))
|
||||
|
||||
cp ${rc_router_dir}/templates/sysctl.conf ${rc_router_gen_dir}/
|
||||
echo "net.fibs=${fib_count}" >> ${rc_router_gen_dir}/sysctl.conf
|
||||
}
|
||||
|
||||
fib_setup_stop()
|
||||
{
|
||||
true
|
||||
}
|
||||
|
||||
|
||||
|
||||
################ Epilogue
|
||||
|
||||
run_rc_command "$1"
|
||||
|
||||
# vim: ft=bash
|
||||
|
||||
Reference in New Issue
Block a user