]> git.ipfire.org Git - people/mlorenz/ipfire-2.x.git/commitdiff
Apache 2.4.27 breaks ExtraHD-GUI
authorMatthias Fischer <matthias.fischer@ipfire.org>
Sun, 1 Oct 2017 18:43:16 +0000 (20:43 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 2 Oct 2017 18:27:52 +0000 (19:27 +0100)
Opening 'extrahd.cgi' led to:
"Response header name 'scanhd idescanhd partitionsCache-control' contains
invalid characters, aborting request".

https://forum.ipfire.org/viewtopic.php?f=27&t=19550#p111030
https://forum.ipfire.org/viewtopic.php?f=50&t=19563&sid=575337ac1caf1df492fced01ca6243de#p111048
https://forum.ipfire.org/viewtopic.php?f=22&t=19563#p111052

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/extrahd/extrahd.pl
html/cgi-bin/extrahd.cgi

index 6593ca47dea17030ec73494eca2508aaa525e3d4..3c6fa028050d6b879cea2130cd4e2b7e55af00e8 100644 (file)
@@ -77,7 +77,7 @@ if ( "$ARGV[0]" eq "mount" ) {
        if ( ! `/bin/mount | /bin/fgrep $ARGV[1]` ) {
                system("/bin/cp -f /etc/fstab $fstab");
                system("/bin/fgrep -v $ARGV[1] <$fstab >/etc/fstab");
-               print "Succesfully umounted $ARGV[1].\n";
+               print "Successfully umounted $ARGV[1].\n";
                exit(0);
        } else {
                print "Can't umount $ARGV[1].\n";
index 5a6fbce8310201bb55287f550036536820d75312..da1efb2ddff23245887643be8a3fcc60c4ae7ba0 100644 (file)
@@ -48,8 +48,13 @@ my $partitionentry = "";
 my $devicefile = "/var/ipfire/extrahd/devices";
 my $scanfile = "/var/ipfire/extrahd/scan";
 my $partitionsfile = "/var/ipfire/extrahd/partitions";
-system("/usr/local/bin/extrahdctrl scanhd ide");
-system("/usr/local/bin/extrahdctrl scanhd partitions");
+
+#workaround to suppress a warning when a variable is used only once
+my @dummy = ( ${Header::colourgreen}, ${Header::colourred} );
+undef (@dummy);
+
+system("/usr/local/bin/extrahdctrl scanhd ide >/dev/null");
+system("/usr/local/bin/extrahdctrl scanhd partitions >/dev/null");
 
 &Header::showhttpheaders();