summaryrefslogtreecommitdiffstats
path: root/initramfs
diff options
context:
space:
mode:
authorDirk von Suchodoletz2007-07-11 16:21:35 +0200
committerDirk von Suchodoletz2007-07-11 16:21:35 +0200
commit41cbd1429c9a708ce030ae8b981f96913edd8133 (patch)
tree5cc733a07ea7da626ec8982fe53b5571f002d68a /initramfs
parentSome cleanup for ubuntu ... (diff)
downloadcore-41cbd1429c9a708ce030ae8b981f96913edd8133.tar.gz
core-41cbd1429c9a708ce030ae8b981f96913edd8133.tar.xz
core-41cbd1429c9a708ce030ae8b981f96913edd8133.zip
Fix for syslog-ng (at least log to console tty10, if filelogging
preferred use start_syslog="file") git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1238 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs')
-rw-r--r--initramfs/distro-specs/suse/functions-default3
-rw-r--r--initramfs/initrd-stuff/etc/functions13
2 files changed, 10 insertions, 6 deletions
diff --git a/initramfs/distro-specs/suse/functions-default b/initramfs/distro-specs/suse/functions-default
index 8c616589..41dfa5a4 100644
--- a/initramfs/distro-specs/suse/functions-default
+++ b/initramfs/distro-specs/suse/functions-default
@@ -118,6 +118,9 @@ fi
# syslog service (use syslog-ng for all versions)
config_syslog () {
if [ "x$start_syslog" != "xno" ] ; then
+ # enable basic logging to console tty10; file logging could be enabled via
+ # setting of config_syslog="file"
+ start_syslog="yes"
if [ -f /mnt/etc/${D_INITDIR}/syslog ] ; then
sed -e "1i# modified in InitRamFS by $0" \
-e "s,SYSLOG_DAEMON=.*,SYSLOG_DAEMON=\"syslog-ng\"," \
diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions
index e97aa30d..543b1887 100644
--- a/initramfs/initrd-stuff/etc/functions
+++ b/initramfs/initrd-stuff/etc/functions
@@ -368,21 +368,22 @@ testmkd () {
# destination (incl. /mnt prefix)
# sysngwriter $dest $start_syslog
sysngwriter () {
-syslogngcfg=$1
+local mysyslogngcfg=$1
# logging servers might be specified in $log_servers (from e.g. dhcp)
# fixme!? only first logserver from dhcp variable is used
[ -n "$log_servers" ] && start_syslog="syslog://${log_servers% *}:514/udp"
echo -e "# File written by $0 within InitRamFS\n\
source src {\n\tfile(\"/proc/kmsg\");\n\
\tunix-dgram(\"/dev/log\");\n\tinternal();\n};\ndestination console_all {\
-\n\tfile(\"/dev/tty10\");\n};" >$syslogngcfg
+\n\tfile(\"/dev/tty10\");\n};" >$mysyslogngcfg
case "$start_syslog" in
yes|Yes|YES)
- : # already defined
+ echo -e "\nlog {\n\tsource(src);\n\tdestination(console_all);\n};" \
+ >>$mysyslogngcfg
;;
file)
echo -e "destination allmessages {\n\tfile(\"/var/log/allmessages\");\n};\
-\nlog {\n\tsource(src); destination(allmessages);\n};" >>$syslogngcfg
+\nlog {\n\tsource(src); destination(allmessages);\n};" >>$mysyslogngcfg
;;
*)
syslogsrv=$(uri_token $start_syslog server)
@@ -391,8 +392,8 @@ case "$start_syslog" in
[ -z ${syslogport} ] && syslogport=514
[ -z ${syslogprot} ] && syslogprot=udp
echo -e "destination loghost {\n\t${syslogprot}(\"${syslogsrv}\" \
-port(${syslogport}));\n};\nlog {\n\tsource(src); destination(loghost);\n};" \
- >>$syslogngcfg
+port(${syslogport}));\n};\nlog {\n\tsource(src);\n\tdestination(loghost);\n};"\
+ >>$mysyslogngcfg
;;
esac
}