machine_setup/ansible/roles/dummynet/files/dummynet
Tom Alexander 5d1c1e2e19
Switch to manual dummynet rc.d implementation.
The existing one does not seem to work.
2024-07-13 14:05:14 -04:00

29 lines
450 B
Bash

#!/bin/sh
#
#
# PROVIDE: dummynet
# BEFORE: pf ipfw
# KEYWORD: nojailvnet
. /etc/rc.subr
name="dummynet"
desc="Dummynet packet queuing and scheduling"
rcvar="${name}_enable"
load_rc_config $name
start_cmd="${name}_start"
required_files="$dummynet_rules"
required_modules="dummynet"
dummynet_start()
{
startmsg -n "Enabling ${name}"
cat "$dnctl_rules" | while read l; do
dnctl $l
done
startmsg '.'
}
run_rc_command $*