summaryrefslogtreecommitdiffstats
path: root/initramfs/initrd-stuff/etc/functions
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/initrd-stuff/etc/functions
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/initrd-stuff/etc/functions')
-rw-r--r--initramfs/initrd-stuff/etc/functions13
1 files changed, 7 insertions, 6 deletions
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
}