mkimage-profiles/features.in/build-ve/image-scripts.d/06syslog
Michael Shigorin abfd88e262 06syslog: more durability
At least it shouldn't bail out when the anticipated file
just isn't there...
2011-12-26 18:36:37 +02:00

17 lines
461 B
Bash
Executable File

#!/bin/sh -e
# tweak syslog configuration to:
# - avoid logging to a nonexistent tty;
# - avoid hard sync logging (one is better off doing
# remote syslog if you do care for reliable data anyways)
# credits: vvk@, thresh@ (2010)
CONFIG=/etc/syslog.conf
[ ! -f "$CONFIG" ] || \
sed -i \
-e 's,/dev/tty12,/var/log/syslog/console,' \
-e 's,^.*/var/log/syslog/console$,#&,' \
-e 's,-/var/log/,/var/log/,g' \
-e 's,/var/log/,-/var/log/,g' \
"$CONFIG"