mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
QoS: Improve saving enabled/disable state
It was reported that the QoS did not stop when the user clicked the "stop" button. This patch fixes that. Fixes #10664 Signed-off-by: Michael Tremer <michael.tremer@ipfire.org> Acked-by: Arne Fitzenreiter <arne.fitzenreiter@ipfire.org>
This commit is contained in:
@@ -463,18 +463,16 @@ if ($qossettings{'ACTION'} eq $Lang::tr{'start'})
|
||||
$qossettings{'ENABLED'} = 'on';
|
||||
&General::writehash("${General::swroot}/qos/settings", \%qossettings);
|
||||
system("/usr/local/bin/qosctrl generate >/dev/null 2>&1");
|
||||
system("/usr/bin/touch /var/ipfire/qos/enable");
|
||||
system("/usr/local/bin/qosctrl start >/dev/null 2>&1");
|
||||
system("logger -t ipfire 'QoS started'");
|
||||
}
|
||||
elsif ($qossettings{'ACTION'} eq $Lang::tr{'stop'})
|
||||
{
|
||||
system("/usr/local/bin/qosctrl stop >/dev/null 2>&1");
|
||||
unlink "/var/ipfire/qos/bin/qos.sh";
|
||||
unlink "/var/ipfire/qos/enable";
|
||||
system("logger -t ipfire 'QoS stopped'");
|
||||
$qossettings{'ENABLED'} = 'off';
|
||||
&General::writehash("${General::swroot}/qos/settings", \%qossettings);
|
||||
system("/usr/local/bin/qosctrl stop >/dev/null 2>&1");
|
||||
system("/usr/local/bin/qosctrl generate >/dev/null 2>&1");
|
||||
system("logger -t ipfire 'QoS stopped'");
|
||||
}
|
||||
elsif ($qossettings{'ACTION'} eq $Lang::tr{'restart'})
|
||||
{
|
||||
@@ -587,7 +585,6 @@ END
|
||||
$qossettings{'ENABLED'} = 'on';
|
||||
&General::writehash("${General::swroot}/qos/settings", \%qossettings);
|
||||
system("/usr/local/bin/qosctrl generate >/dev/null 2>&1");
|
||||
system("/usr/bin/touch /var/ipfire/qos/enable");
|
||||
system("/usr/local/bin/qosctrl start >/dev/null 2>&1");
|
||||
system("logger -t ipfire 'QoS started'");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user