You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
461 B

3 years ago
#!/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"