summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/etc/inc/pkg-utils.inc11
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();
}
OpenPOWER on IntegriCloud