[Rear-users] SF.net SVN: rear:[485] trunk/usr/share/rear

jhoekx at users.sourceforge.net jhoekx at users.sourceforge.net
Tue May 24 12:10:31 CEST 2011


Revision: 485
          http://rear.svn.sourceforge.net/rear/?rev=485&view=rev
Author:   jhoekx
Date:     2011-05-24 10:10:31 +0000 (Tue, 24 May 2011)

Log Message:
-----------
Add support for syslog-ng v3. Configuration tested on Arch Linux.

Modified Paths:
--------------
    trunk/usr/share/rear/conf/GNU/Linux.conf
    trunk/usr/share/rear/skel/default/etc/scripts/run-syslog

Added Paths:
-----------
    trunk/usr/share/rear/skel/default/etc/syslog-ng-v3.conf

Modified: trunk/usr/share/rear/conf/GNU/Linux.conf
===================================================================
--- trunk/usr/share/rear/conf/GNU/Linux.conf	2011-05-24 09:59:40 UTC (rev 484)
+++ trunk/usr/share/rear/conf/GNU/Linux.conf	2011-05-24 10:10:31 UTC (rev 485)
@@ -187,12 +187,12 @@
 ohci_hcd
 )
 
-COPY_AS_IS=( ${COPY_AS_IS[@]} /dev /etc/inputr[c] /etc/protocols /etc/services /etc/rpc /etc/termcap /*/terminfo /usr/share/terminfo /etc/netconfig /etc/mke2fs.conf /etc/*-release /lib*/firmware /etc/localtime )
+COPY_AS_IS=( ${COPY_AS_IS[@]} /dev /etc/inputr[c] /etc/protocols /etc/services /etc/rpc /etc/termcap /*/terminfo /usr/share/terminfo /etc/netconfig /etc/mke2fs.conf /etc/*-release /lib*/firmware /etc/localtime /usr/lib*/syslog-ng)
 # exclude /dev/shm/*, due to the way we use tar the leading / should be omitted
 COPY_AS_IS_EXCLUDE=( ${COPY_AS_IS_EXCLUDE[@]} dev/shm/\* )
 
 # some stuff for the Linux command line
 KERNEL_CMDLINE="$KERNEL_CMDLINE selinux=0 quiet"
 # common users and groups
-CLONE_USERS=( "${CLONE_USERS[@]}" daemon rpc usbmuxd usbmux vcsa )
+CLONE_USERS=( "${CLONE_USERS[@]}" daemon rpc usbmuxd usbmux vcsa nobody)
 CLONE_GROUPS=( "${CLONE_GROUPS[@]}" tty usbmuxd usbmux fuse ) 

Modified: trunk/usr/share/rear/skel/default/etc/scripts/run-syslog
===================================================================
--- trunk/usr/share/rear/skel/default/etc/scripts/run-syslog	2011-05-24 09:59:40 UTC (rev 484)
+++ trunk/usr/share/rear/skel/default/etc/scripts/run-syslog	2011-05-24 10:10:31 UTC (rev 485)
@@ -4,11 +4,20 @@
 
 if type -p rsyslogd >/dev/null ; then
         exec rsyslogd -c3 -n -i /var/run/rsyslogd.pid -f /etc/rsyslog.conf -M /lib$(test -s /lib64/imklog.so && echo 64)
-else
+elif type -p syslog-ng >/dev/null ; then
+    # need get_version and version_newer functions
+    . /usr/share/rear/lib/layout-functions.sh
+
+    ng_version=$(get_version syslog-ng --version)
+    if version_newer "$ng_version" "3" ; then
+        # /var/empty needs to be owned by root
+        chown root:root /var/empty
+        exec syslog-ng -p /var/run/syslog-ng.pid -f /etc/syslog-ng-v3.conf -F --no-caps
+    else
         klogd -c 1 -x
-        if type -p syslog-ng >/dev/null ; then
-                exec syslog-ng -p /var/run/syslog-ng.pid -f /etc/syslog-ng.conf -F
-        else
-                exec syslogd -f /etc/syslog.conf -n 
-        fi
+        exec syslog-ng -p /var/run/syslog-ng.pid -f /etc/syslog-ng.conf -F
+    fi
+elif type -p syslogd >/dev/null ; then
+    klogd -c 1 -x
+    exec syslogd -f /etc/syslog.conf -n 
 fi

Added: trunk/usr/share/rear/skel/default/etc/syslog-ng-v3.conf
===================================================================
--- trunk/usr/share/rear/skel/default/etc/syslog-ng-v3.conf	                        (rev 0)
+++ trunk/usr/share/rear/skel/default/etc/syslog-ng-v3.conf	2011-05-24 10:10:31 UTC (rev 485)
@@ -0,0 +1,13 @@
+ at version: 3.2
+# Send everything to /dev/tty12
+
+options { long_hostnames(off); create_dirs (yes); };
+source src {
+   internal();
+   unix-dgram("/dev/log");
+   file("/proc/kmsg");
+};
+destination console { file("/dev/tty12"); };
+destination messages { file("/var/log/messages"); };
+log { source(src); destination(console); };
+log { source(src); destination(messages); };


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rear-users mailing list