Switch to manual dummynet rc.d implementation.
The existing one does not seem to work.
This commit is contained in:
parent
043061fb16
commit
5d1c1e2e19
@ -1,2 +1,2 @@
|
|||||||
dnctl pipe 1 config bw 100KByte/s
|
pipe 1 config bw 100KByte/s
|
||||||
dnctl pipe 2 config
|
pipe 2 config
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
dnctl_enable="YES"
|
|
||||||
dnctl_rules="/etc/dnctl.conf"
|
|
28
ansible/roles/dummynet/files/dummynet
Normal file
28
ansible/roles/dummynet/files/dummynet
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#!/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 $*
|
2
ansible/roles/dummynet/files/dummynet_rc.conf
Normal file
2
ansible/roles/dummynet/files/dummynet_rc.conf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
dummynet_enable="YES"
|
||||||
|
dummynet_rules="/etc/dnctl.conf"
|
@ -9,6 +9,16 @@
|
|||||||
- src: "{{ dummynet_config }}"
|
- src: "{{ dummynet_config }}"
|
||||||
dest: /etc/dnctl.conf
|
dest: /etc/dnctl.conf
|
||||||
|
|
||||||
|
- name: Install rc script
|
||||||
|
copy:
|
||||||
|
src: "files/{{ item.src }}"
|
||||||
|
dest: "/usr/local/etc/rc.d/{{ item.dest|default(item.src) }}"
|
||||||
|
owner: root
|
||||||
|
group: wheel
|
||||||
|
mode: 0755
|
||||||
|
loop:
|
||||||
|
- src: dummynet
|
||||||
|
|
||||||
- name: Install service configuration
|
- name: Install service configuration
|
||||||
copy:
|
copy:
|
||||||
src: "files/{{ item }}_rc.conf"
|
src: "files/{{ item }}_rc.conf"
|
||||||
@ -17,4 +27,4 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: wheel
|
group: wheel
|
||||||
loop:
|
loop:
|
||||||
- dnctl
|
- dummynet
|
||||||
|
Loading…
Reference in New Issue
Block a user