From 19e5c076ef737e7389bcfb5378a0ad1855c7325c Mon Sep 17 00:00:00 2001 From: Philippe Coval Date: Fri, 28 Nov 2025 10:31:12 +0100 Subject: [PATCH] s/xe-syslog-reconfigure: Keep disclaimer in remote.conf The behaviour is same, except that the file will remain (with empty rules) even if the forwarding log has been disabled (and then prevent the disclaimer loss). Wording slightly modified to reduce the risk of concurrent management of this file, if the file is still edited by other mean, it will be done knowingly (that x-s-r may override any change soon or later). For the record remote.conf was introduced in: 468eb75dddfea6db512a8bfb4860ff2042efab66 . I am assuming that the presence of file is not checked elsewhere that in xen-api (currently only s/x-s-r is referencing this file). Signed-off-by: Philippe Coval --- scripts/xe-syslog-reconfigure | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/xe-syslog-reconfigure b/scripts/xe-syslog-reconfigure index de84881d688..fa5ad0b7969 100644 --- a/scripts/xe-syslog-reconfigure +++ b/scripts/xe-syslog-reconfigure @@ -15,11 +15,9 @@ do done +echo "# /etc/rsyslog.d/remote.conf is managed by xe-syslog-reconfigure (do not edit)" > /etc/rsyslog.d/remote.conf if [ $remote -eq 1 ]; then - echo "# /etc/rsyslog.d/remote.conf is auto-generated by xe-syslog-reconfigure" > /etc/rsyslog.d/remote.conf echo "*.* @$host" >> /etc/rsyslog.d/remote.conf -else - rm -f /etc/rsyslog.d/remote.conf fi systemctl restart rsyslog