stricter pattern matching in local.sh so that comments are not considered

This commit is contained in:
Antoine Beaupré 2007-12-12 22:28:29 +00:00
parent 62cd8a201b
commit dcd3687701
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ $compat = array('DEFAULT_MX' => 'MX',
$config_file = fopen('/etc/alternc/local.sh', 'r');
while (FALSE !== ($line = fgets($config_file))) {
if (ereg('([A-Z0-9_]*)="([^"]*)"', $line, $regs)) {
if (ereg('^([A-Z0-9_]*)="([^"]*)"', $line, $regs)) {
$GLOBALS['L_'.$regs[1]] = $regs[2];
if (isset($compat[$regs[1]])) {
$GLOBALS['L_'.$compat[$regs[1]]] = $regs[2];