diff options
author | Renato Botelho <renato@netgate.com> | 2015-09-28 10:17:41 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-09-28 10:17:41 -0300 |
commit | a1c141eb7ef1397c44b677f147f773e7b3727da8 (patch) | |
tree | 263d907906fd90ef972060afba00dba36c515636 /src | |
parent | 16c26e657d80dcb4a895b03944a723e9cb2fa587 (diff) | |
parent | f164ace44a5045e9f05e10b24ce2842a04e0be4e (diff) | |
download | pfsense-a1c141eb7ef1397c44b677f147f773e7b3727da8.zip pfsense-a1c141eb7ef1397c44b677f147f773e7b3727da8.tar.gz |
Merge pull request #1940 from doktornotor/patch-2
Diffstat (limited to 'src')
-rw-r--r-- | src/etc/inc/pkg-utils.inc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/etc/inc/pkg-utils.inc b/src/etc/inc/pkg-utils.inc index d4a1ec4..0e9107b 100644 --- a/src/etc/inc/pkg-utils.inc +++ b/src/etc/inc/pkg-utils.inc @@ -863,14 +863,14 @@ function delete_package_xml($package_name, $when = "post-deinstall") { } } /* syslog */ + $need_syslog_restart = false; if (is_array($pkg_info['logging']) && $pkg_info['logging']['logfilename'] <> "") { $static_output .= "Syslog entries... "; update_output_window($static_output); - remove_text_from_file("/etc/syslog.conf", $pkg_info['logging']['facilityname'] . "\t\t\t\t" . $pkg_info['logging']['logfilename']); - system_syslogd_start(); @unlink("{$g['varlog_path']}/{$pkg_info['logging']['logfilename']}"); $static_output .= "done.\n"; update_output_window($static_output); + $need_syslog_restart = true; } /* remove config.xml entries */ @@ -880,6 +880,13 @@ function delete_package_xml($package_name, $when = "post-deinstall") { $static_output .= gettext("done.") . "\n"; update_output_window($static_output); write_config("Removed {$package_name} package.\n"); + + /* remove package entry from /etc/syslog.conf if needed */ + /* this must be done after removing the entries from config.xml */ + if ($need_syslog_restart) { + system_syslogd_start(); + } + conf_mount_ro(); } |