rsyslog/rsyslog-service-prepare.in
Marius Tomaschewski b8fcf9826c Accepting request 141068 from home:mtomaschewski:syslog
- Removed handling of the -c <compat version> option which is
  obsolete in rsyslog-7.x.
- Fixed build requires / deps to work on 12.x and SLE-11-SP2.
- Initialized RSYSLOG_PARAMS env variable in service file.
- Marked additional log socket config as ghost.

OBS-URL: https://build.opensuse.org/request/show/141068
OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=112
2012-11-13 08:13:03 +00:00

36 lines
687 B
Bash

#!/bin/sh
test -s "/etc/sysconfig/syslog" && \
. "/etc/sysconfig/syslog"
run_dir="RUN_DIR"
cfg_file="ADDITIONAL_SOCKETS"
umask 0022
/bin/mkdir -p -m 0755 "${run_dir}"
#
# Prepare include with sockets in chroot's
#
> "${cfg_file}"
for variable in ${!SYSLOGD_ADDITIONAL_SOCKET*}; do
eval value=\$$variable
test -z "$value" && continue
test -d "${value%/*}" || continue
echo "\$AddUnixListenSocket $value"
done >> "${cfg_file}"
#
# make sure xconsole exists and is a pipe
#
if test -e /dev/xconsole -a ! -p /dev/xconsole ; then
/bin/rm -f /dev/xconsole
fi
if test ! -e /dev/xconsole ; then
/bin/mknod -m 0600 /dev/xconsole p
/bin/chown root:tty /dev/xconsole
fi
exit 0