]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/misc-progs/qosctrl.c
BETA 1!
[ipfire-2.x.git] / src / misc-progs / qosctrl.c
index 8a8f07ebc099eb5c17613bf4c89f1bfc5a8a1a06..1749ef81a2bff11576a1eec7ce7a38f7eed6839d 100644 (file)
@@ -25,6 +25,9 @@ int main(int argc, char *argv[]) {
                exit(1);
        }
        
+       if (strcmp(argv[1], "generate") == 0)
+               safe_system("/usr/bin/perl /var/ipfire/qos/bin/makeqosscripts.pl > /var/ipfire/qos/bin/qos.sh");
+       
        if ((fd = open("/var/ipfire/qos/bin/qos.sh", O_RDONLY)) != -1) {
                close(fd);
        } else {
@@ -41,8 +44,6 @@ 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");
        } else {
                fprintf(stderr, "\nBad argument given.\n\nqosctrl (start|stop|restart|status|generate)\n\n");
                exit(1);