my.cnf and grep bugsquashes from mailing list
authorslef <slef>
Sun, 7 Sep 2003 22:51:46 +0000 (22:51 +0000)
committerslef <slef>
Sun, 7 Sep 2003 22:51:46 +0000 (22:51 +0000)
misc/Install.pm

index add939d..ffa78be 100644 (file)
@@ -118,6 +118,7 @@ sub heading ($) {
 
 my $mycnf = $ENV{HOME}."/.my.cnf";
 my $mytmpcnf = `mktemp my.cnf.koha.XXXXXX`;
+chomp($mytmpcnf);
 
 my $messages;
 $messages->{'continuing'}->{en}="Great!  Continuing setup.\n\n";
@@ -1188,7 +1189,7 @@ sub updateapacheconf {
     }
 
        startsysout;
-    if (`grep 'VirtualHost $servername' "$httpdconf"`) {
+    if (`grep -q 'VirtualHost $servername' "$httpdconf"`) {
        showmessage(getmessage('ApacheAlreadyConfigured', [$httpdconf, $httpdconf]), 'PressEnter');
        return;
     } else {