QoS-Improvements.

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@269 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
ms
2006-09-11 13:46:05 +00:00
parent 363fb6afce
commit cfd19520d7
3 changed files with 16 additions and 6 deletions

View File

@@ -1,3 +1,11 @@
------------------------------------------------------------------------
r268 | ms | 2006-09-10 21:52:20 +0200 (Sun, 10 Sep 2006) | 5 lines
Geaendert:
* Squid auf neuesten Stand gebracht.
* QoS-Fortschritt.
* Kleines Script fuer Sprachdateiupdates.
------------------------------------------------------------------------
r267 | ms | 2006-09-02 22:18:51 +0200 (Sat, 02 Sep 2006) | 4 lines

View File

@@ -323,9 +323,9 @@ END
if ($qossettings{'ACTION'} eq 'Start')
{
system("sleep 1 && /usr/bin/perl /var/ipfire/qos/bin/makeqosscripts.pl > /var/ipfire/qos/bin/qos.sh &");
system("/usr/local/bin/qosctrl generate >/dev/null 2>&1");
system("/bin/touch /var/ipfire/qos/enable");
system("sleep 2 && /usr/local/bin/qosctrl start >/dev/null 2>&1");
system("/usr/local/bin/qosctrl start >/dev/null 2>&1");
system("logger -t ipfire 'QoS started'");
$qossettings{'ENABLED'} = 'on';
&General::writehash("${General::swroot}/qos/settings", \%qossettings);
@@ -343,8 +343,8 @@ elsif ($qossettings{'ACTION'} eq 'Neustart')
{
if ($qossettings{'ENABLED'} eq 'on'){
system("/usr/local/bin/qosctrl stop >/dev/null 2>&1");
system("sleep 1 && /usr/bin/perl /var/ipfire/qos/bin/makeqosscripts.pl > /var/ipfire/qos/bin/qos.sh &");
system("sleep 5 && /usr/local/bin/qosctrl start >/dev/null 2>&1");
system("/usr/local/bin/qosctrl generate >/dev/null 2>&1");
system("/usr/local/bin/qosctrl start >/dev/null 2>&1");
system("logger -t ipfire 'QoS restarted'");
}
}

View File

@@ -22,7 +22,7 @@ int main(int argc, char *argv[]) {
exit(1);
if (argc < 2) {
fprintf(stderr, "\nNo argument given.\n\nqosctrl (start|stop|restart|status)\n\n");
fprintf(stderr, "\nNo argument given.\n\nqosctrl (start|stop|restart|status|generate)\n\n");
exit(1);
}
@@ -43,8 +43,10 @@ int main(int argc, char *argv[]) {
safe_system("/var/ipfire/qos/bin/qos.sh status");
} else if (strcmp(argv[1], "restart") == 0) {
safe_system("/var/ipfire/qos/bin/qos.sh restart");
} else if (strcmp(argv[1], "generate") == 0) {
safe_system("/usr/bin/perl /var/ipfire/qos/bin/makeqosscripts.pl > /var/ipfire/qos/bin/qos.sh 2>/dev/null");
} else {
fprintf(stderr, "\nBad argument given.\n\nqosctrl (start|stop|restart|status)\n\n");
fprintf(stderr, "\nBad argument given.\n\nqosctrl (start|stop|restart|status|generate)\n\n");
exit(1);
}