Shaper unter Debain (ETCH)

sollte folgender Fehler

RTNETLINK answers: No such file or directory

auftreten, so hilft ein Artikel aus der Projektseite:

NETLINK answers: No such file or directory
When i do
debian:~# /etc/init.d/shaper restart

i get
Stopping CBQ traffic shaping: shaper.
Starting CBQ traffic shaping: RTNETLINK answers: No
such file or directory
shaper.

After 2 days of digging i figured that it's normal, and that
/var/cache/shaper/cbq.init
should have
2>/dev/null
after
/sbin/tc qdisc del dev eth0 root
but for some reason it didn't

I checked /etc/init.d/shaper and found out, that it does
have
2>/dev/null
after
tc qdisc del dev $1 root

then i realized that it works only when it code get's
executed it and does not work when code get's printed to
cache, couse 2>/dev/null goes to echo of code not to the
code itself.

It starts working if you change 2>/dev/null to '2>/dev/null'
but for the same time it will put erros when code is
executed so basicly i suggest following patching

——————–
### EXEC Remove root class from device $1
cbq_device_off () {
tc qdisc del dev $1 root 2>/dev/null
} # cbq_device_off

### Remove CBQ from all devices
cbq_off () {
for dev in `cbq_device_list`; do
cbq_device_off $dev
done
} # cbq_off
——————–
SHOULD BE REPLACED WITH
——————–
### Remove root class from device $1
cbq_device_off () {
tc qdisc del dev $1 root '2>/dev/null'
} # cbq_device_off

### EXEC Remove root class from device $1
exec_cbq_device_off () {
tc qdisc del dev $1 root 2>/dev/null
} # cbq_device_off

### Remove CBQ from all devices
cbq_off () {
for dev in `cbq_device_list`; do
exec_cbq_device_off $dev
done
} # cbq_off

 

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert