From fc4334526a01d6a372d16a1a74f7983acd7a3e32 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Tue, 27 Feb 2018 06:34:08 +0100 Subject: [PATCH] saving uncommitted changes in /etc prior to emerge run --- .etckeeper | 2 + config-archive/etc/rsyslog.d/50-default.conf | 12 +- .../etc/rsyslog.d/50-default.conf.1 | 95 ++++++++++++++++ .../etc/rsyslog.d/50-default.conf.dist.new | 12 ++ rsyslog.d/50-default.conf | 14 ++- rsyslog.d/50-default.conf.default | 107 ++++++++++++++++++ 6 files changed, 235 insertions(+), 7 deletions(-) create mode 100644 config-archive/etc/rsyslog.d/50-default.conf.1 create mode 100644 rsyslog.d/50-default.conf.default diff --git a/.etckeeper b/.etckeeper index 5b5b1253..4069f0cc 100755 --- a/.etckeeper +++ b/.etckeeper @@ -892,6 +892,7 @@ maybe chmod 0644 'config-archive/etc/request-key.conf' maybe chmod 0644 'config-archive/etc/request-key.conf.dist' maybe chmod 0755 'config-archive/etc/rsyslog.d' maybe chmod 0644 'config-archive/etc/rsyslog.d/50-default.conf' +maybe chmod 0644 'config-archive/etc/rsyslog.d/50-default.conf.1' maybe chmod 0644 'config-archive/etc/rsyslog.d/50-default.conf.dist.new' maybe chmod 0755 'config-archive/etc/samba' maybe chmod 0644 'config-archive/etc/samba/smbusers' @@ -2457,6 +2458,7 @@ maybe chmod 0644 'rsyslog.conf' maybe chmod 0755 'rsyslog.d' maybe chmod 0644 'rsyslog.d/.keep_app-admin_rsyslog-0' maybe chmod 0644 'rsyslog.d/50-default.conf' +maybe chmod 0644 'rsyslog.d/50-default.conf.default' maybe chmod 0644 'rsyslog.d/60-fb.conf' maybe chmod 0755 'runlevels' maybe chmod 0755 'runlevels/boot' diff --git a/config-archive/etc/rsyslog.d/50-default.conf b/config-archive/etc/rsyslog.d/50-default.conf index de5767c6..85261335 100644 --- a/config-archive/etc/rsyslog.d/50-default.conf +++ b/config-archive/etc/rsyslog.d/50-default.conf @@ -77,12 +77,12 @@ # Uncomment the following directive to re-enable the # deprecated "/var/log/syslog" log file (don't forget to re-enable log # rotation in "/etc/logrotate.d/rsyslog" if you do that!) -*.*;auth,authpriv.none,mail.none action( - type="omfile" - File="/var/log/syslog" - FileOwner="root" - FileGroup="adm" -) +#*.*;auth,authpriv.none,mail.none action( +# type="omfile" +# File="/var/log/syslog" +# FileOwner="root" +# FileGroup="adm" +#) *.emerg action( type="omusrmsg" diff --git a/config-archive/etc/rsyslog.d/50-default.conf.1 b/config-archive/etc/rsyslog.d/50-default.conf.1 new file mode 100644 index 00000000..de5767c6 --- /dev/null +++ b/config-archive/etc/rsyslog.d/50-default.conf.1 @@ -0,0 +1,95 @@ +####################### +### DEFAULT ACTIONS ### +####################### + +#auth,authpriv.* action( +# type="omfile" +# File="/var/log/auth.log" +# FileCreateMode="0600" +# FileOwner="root" +# FileGroup="adm" +# Sync="off" +#) + +#cron.* action( +# type="omfile" +# File="/var/log/cron.log" +# FileOwner="root" +# FileGroup="adm" +#) + +#daemon.* action( +# type="omfile" +# File="/var/log/daemon.log" +# FileOwner="root" +# FileGroup="adm" +#) + +#kern.* action( +# type="omfile" +# File="/var/log/kern.log" +# FileOwner="root" +# FileGroup="adm" +#) + +#lpr.* action( +# type="omfile" +# File="/var/log/lpr.log" +# FileOwner="root" +# FileGroup="adm" +#) + +#mail.* action( +# type="omfile" +# File="/var/log/mail.log" +# FileOwner="root" +# FileGroup="adm" +#) + +#news.* action( +# type="omfile" +# File="/var/log/news.log" +# FileOwner="root" +# FileGroup="adm" +#) + +#user.* action( +# type="omfile" +# File="/var/log/user.log" +# FileOwner="root" +# FileGroup="adm" +#) + +*.=debug;auth,authpriv,news,mail.none action( + type="omfile" + File="/var/log/debug.log" + FileOwner="root" + FileGroup="adm" +) + +*.info;auth,authpriv,cron,daemon,lpr,mail,news.none action( + type="omfile" + File="/var/log/messages" + FileOwner="root" + FileGroup="adm" +) + +# Uncomment the following directive to re-enable the +# deprecated "/var/log/syslog" log file (don't forget to re-enable log +# rotation in "/etc/logrotate.d/rsyslog" if you do that!) +*.*;auth,authpriv.none,mail.none action( + type="omfile" + File="/var/log/syslog" + FileOwner="root" + FileGroup="adm" +) + +*.emerg action( + type="omusrmsg" + Users="*" + action.execOnlyOnceEveryInterval="10" +) + +# Create an additional socket for the default chroot location +# (used by net-misc/openssh[hpn], see https://bugs.gentoo.org/490744) +input(type="imuxsock" Socket="/var/empty/dev/log") diff --git a/config-archive/etc/rsyslog.d/50-default.conf.dist.new b/config-archive/etc/rsyslog.d/50-default.conf.dist.new index 9ae85782..920c214f 100644 --- a/config-archive/etc/rsyslog.d/50-default.conf.dist.new +++ b/config-archive/etc/rsyslog.d/50-default.conf.dist.new @@ -3,6 +3,7 @@ ####################### auth,authpriv.* action( + name="action_auth" type="omfile" File="/var/log/auth.log" FileCreateMode="0600" @@ -12,6 +13,7 @@ auth,authpriv.* action( ) cron.* action( + name="action_cron" type="omfile" File="/var/log/cron.log" FileOwner="root" @@ -19,6 +21,7 @@ cron.* action( ) daemon.* action( + name="action_daemon" type="omfile" File="/var/log/daemon.log" FileOwner="root" @@ -26,6 +29,7 @@ daemon.* action( ) kern.* action( + name="action_kern" type="omfile" File="/var/log/kern.log" FileOwner="root" @@ -33,6 +37,7 @@ kern.* action( ) lpr.* action( + name="action_lpr" type="omfile" File="/var/log/lpr.log" FileOwner="root" @@ -40,6 +45,7 @@ lpr.* action( ) mail.* action( + name="action_mail" type="omfile" File="/var/log/mail.log" FileOwner="root" @@ -47,6 +53,7 @@ mail.* action( ) news.* action( + name="action_news" type="omfile" File="/var/log/news.log" FileOwner="root" @@ -54,6 +61,7 @@ news.* action( ) user.* action( + name="action_user" type="omfile" File="/var/log/user.log" FileOwner="root" @@ -61,6 +69,7 @@ user.* action( ) *.=debug;auth,authpriv,news,mail.none action( + name="action_debug" type="omfile" File="/var/log/debug.log" FileOwner="root" @@ -68,6 +77,7 @@ user.* action( ) *.info;auth,authpriv,cron,daemon,lpr,mail,news.none action( + name="action_messages" type="omfile" File="/var/log/messages" FileOwner="root" @@ -78,6 +88,7 @@ user.* action( # deprecated "/var/log/syslog" log file (don't forget to re-enable log # rotation in "/etc/logrotate.d/rsyslog" if you do that!) #*.*;auth,authpriv.none action( +# name="action_syslog" # type="omfile" # File="/var/log/syslog" # FileOwner="root" @@ -85,6 +96,7 @@ user.* action( #) *.emerg action( + name="action_emerge" type="omusrmsg" Users="*" action.execOnlyOnceEveryInterval="10" diff --git a/rsyslog.d/50-default.conf b/rsyslog.d/50-default.conf index 85261335..561aa935 100644 --- a/rsyslog.d/50-default.conf +++ b/rsyslog.d/50-default.conf @@ -3,6 +3,7 @@ ####################### #auth,authpriv.* action( +# name="action_auth" # type="omfile" # File="/var/log/auth.log" # FileCreateMode="0600" @@ -12,6 +13,7 @@ #) #cron.* action( +# name="action_cron" # type="omfile" # File="/var/log/cron.log" # FileOwner="root" @@ -19,6 +21,7 @@ #) #daemon.* action( +# name="action_daemon" # type="omfile" # File="/var/log/daemon.log" # FileOwner="root" @@ -26,6 +29,7 @@ #) #kern.* action( +# name="action_kern" # type="omfile" # File="/var/log/kern.log" # FileOwner="root" @@ -33,6 +37,7 @@ #) #lpr.* action( +# name="action_lpr" # type="omfile" # File="/var/log/lpr.log" # FileOwner="root" @@ -40,6 +45,7 @@ #) #mail.* action( +# name="action_mail" # type="omfile" # File="/var/log/mail.log" # FileOwner="root" @@ -47,6 +53,7 @@ #) #news.* action( +# name="action_news" # type="omfile" # File="/var/log/news.log" # FileOwner="root" @@ -54,6 +61,7 @@ #) #user.* action( +# name="action_user" # type="omfile" # File="/var/log/user.log" # FileOwner="root" @@ -61,6 +69,7 @@ #) *.=debug;auth,authpriv,news,mail.none action( + name="action_debug" type="omfile" File="/var/log/debug.log" FileOwner="root" @@ -68,6 +77,7 @@ ) *.info;auth,authpriv,cron,daemon,lpr,mail,news.none action( + name="action_messages" type="omfile" File="/var/log/messages" FileOwner="root" @@ -77,7 +87,8 @@ # Uncomment the following directive to re-enable the # deprecated "/var/log/syslog" log file (don't forget to re-enable log # rotation in "/etc/logrotate.d/rsyslog" if you do that!) -#*.*;auth,authpriv.none,mail.none action( +#*.*;auth,authpriv.none action( +# name="action_syslog" # type="omfile" # File="/var/log/syslog" # FileOwner="root" @@ -85,6 +96,7 @@ #) *.emerg action( + name="action_emerge" type="omusrmsg" Users="*" action.execOnlyOnceEveryInterval="10" diff --git a/rsyslog.d/50-default.conf.default b/rsyslog.d/50-default.conf.default new file mode 100644 index 00000000..920c214f --- /dev/null +++ b/rsyslog.d/50-default.conf.default @@ -0,0 +1,107 @@ +####################### +### DEFAULT ACTIONS ### +####################### + +auth,authpriv.* action( + name="action_auth" + type="omfile" + File="/var/log/auth.log" + FileCreateMode="0600" + FileOwner="root" + FileGroup="adm" + Sync="off" +) + +cron.* action( + name="action_cron" + type="omfile" + File="/var/log/cron.log" + FileOwner="root" + FileGroup="adm" +) + +daemon.* action( + name="action_daemon" + type="omfile" + File="/var/log/daemon.log" + FileOwner="root" + FileGroup="adm" +) + +kern.* action( + name="action_kern" + type="omfile" + File="/var/log/kern.log" + FileOwner="root" + FileGroup="adm" +) + +lpr.* action( + name="action_lpr" + type="omfile" + File="/var/log/lpr.log" + FileOwner="root" + FileGroup="adm" +) + +mail.* action( + name="action_mail" + type="omfile" + File="/var/log/mail.log" + FileOwner="root" + FileGroup="adm" +) + +news.* action( + name="action_news" + type="omfile" + File="/var/log/news.log" + FileOwner="root" + FileGroup="adm" +) + +user.* action( + name="action_user" + type="omfile" + File="/var/log/user.log" + FileOwner="root" + FileGroup="adm" +) + +*.=debug;auth,authpriv,news,mail.none action( + name="action_debug" + type="omfile" + File="/var/log/debug.log" + FileOwner="root" + FileGroup="adm" +) + +*.info;auth,authpriv,cron,daemon,lpr,mail,news.none action( + name="action_messages" + type="omfile" + File="/var/log/messages" + FileOwner="root" + FileGroup="adm" +) + +# Uncomment the following directive to re-enable the +# deprecated "/var/log/syslog" log file (don't forget to re-enable log +# rotation in "/etc/logrotate.d/rsyslog" if you do that!) +#*.*;auth,authpriv.none action( +# name="action_syslog" +# type="omfile" +# File="/var/log/syslog" +# FileOwner="root" +# FileGroup="adm" +#) + +*.emerg action( + name="action_emerge" + type="omusrmsg" + Users="*" + action.execOnlyOnceEveryInterval="10" +) + +# Create an additional socket for the default chroot location +# (used by net-misc/openssh[hpn], see https://bugs.gentoo.org/490744) +input(type="imuxsock" Socket="/var/empty/dev/log") -- 2.39.5