]>
git.ipfire.org Git - thirdparty/dracut.git/blob - modules.d/98syslog/syslog-genrules.sh
2 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3 # ex: ts=8 sw=4 sts=4 et filetype=sh
5 # Creates the syslog udev rules to be triggered when interface becomes online.
6 type getarg
>/dev
/null
2>&1 || .
/lib
/dracut-lib.sh
10 if [ -e /sbin
/rsyslogd
]; then
12 elif [ -e /sbin
/syslogd
]; then
14 elif [ /sbin
/syslog-ng
]; then
15 syslogtype
="syslog-ng"
17 warn
"Could not find any syslog binary although the syslogmodule is selected to be installed. Please check."
23 read syslogtype
< /tmp
/syslog.
type
24 if [ -z "$syslogtype" ]; then
25 syslogtype
=$
(detect_syslog
)
26 echo $syslogtype > /tmp
/syslog.
type
28 if [ -e "/sbin/${syslogtype}-start" ]; then
29 printf 'ACTION=="online", SUBSYSTEM=="net", RUN+="/sbin/initqueue --onetime /sbin/'${syslogtype}'-start $env{INTERFACE}"\n' > /etc
/udev
/rules.d
/70-syslog.rules
31 warn
"syslog-genrules: Could not find binary to start syslog of type \"$syslogtype\". Syslog will not be started."