[exim-dev] [Bug 497] New: exiwhat hangs up if there is no de…

Etusivu
Poista viesti
Vastaa
Lähettäjä: bug497
Päiväys:  
Vastaanottaja: exim-dev
Aihe: [exim-dev] [Bug 497] New: exiwhat hangs up if there is no default config file
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

http://www.exim.org/bugzilla/show_bug.cgi?id=497

           Summary: exiwhat hangs up if there is no default config file
           Product: Exim
           Version: 4.66
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Unfiled
        AssignedTo: ph10@???
        ReportedBy: cronfy@???
         QAContact: exim-dev@???



When there is no default config file exiwhat hangs up. This happens because
exiwhat tries to parse config file to find spool_directory with grep. The
problem is in this string:

exim_path=`grep "^[$st]*exim_path" $config | sed "s/.*=[$st]*//"`

When exiwhat cannot find config it continues to run grep with empty $config
argument. grep starts to read from stdin - and is waiting until Ctrl-C.

This could be resolved with adding check after while that searches for config
file:

[ -z "$config" ] && { echo Config file not found. ; exit 1 ; }



It also would be nice if exiwhat could receive path to config file via first
argument.

--
Configure bugmail: http://www.exim.org/bugzilla/userprefs.cgi?tab=email