@@ -46,6 +46,58 @@
NETCONFIG_NTP_POLICY="auto"
EOF
+cat >> /etc/sysconfig/network/scripts/logserver-up.sh <<EOF
+#!/bin/bash
+SCRIPTNAME=$0
+
+function get_logserver {
+ DHCPINFOFILE=`grep -H ^LOGSERVER /var/lib/dhcpcd/*.info |awk -F: '{print $1}'`
+ if [ -f "${DHCPINFOFILE}" ] ; then
+ . ${DHCPINFOFILE}
+ export LOGSERVER
+ echo ${LOGSERVER}
+ else
+ echo "localhost"
+ fi
+}
+
+function add_logserver {
+ LOGHOST=`get_logserver`
+ case ${LOGHOST} in
+ localhost)
+
+ ;;
+ *)
+ if [ -f /etc/syslog-ng/syslog-ng.conf ] ; then
+ if [ -z "`grep ${LOGHOST} /etc/syslog-ng/syslog-ng.conf`" ] ; then
+ echo "
+destination loghost {
+ udp(\"${LOGHOST}\" port (514));
+};
+log { source(src); destination(loghost); };
+" >> /etc/syslog-ng/syslog-ng.conf
+ if [ -x /etc/init.d/syslog ] ; then
+ /etc/init.d/syslog restart
+ fi
+ fi
+ fi
+ ;;
+ esac
+}
+
+
+case $SCRIPTNAME in
+*if-up.d*)
+ add_logserver
+;;
+*if-down.d*)
+
+;;
+esac
+EOF
+chmod +x /etc/sysconfig/network/scripts/logserver-up.sh
+ln -s /etc/sysconfig/network/scripts/logserver-up.sh /etc/sysconfig/network/if-up.d/logserver
+
# runlevel 3 as default
sed -i 's/^id:5:initdefault:/id:3:initdefault:/' /etc/inittab
@@ -68,7 +120,7 @@
echo ttyS1 >> /etc/securetty
echo "" >> /etc/inittab
echo "S0:12345:respawn:/sbin/agetty -L 19200 ttyS0 vt102" >> /etc/inittab
-echo "S1:12345:respawn:/sbin/agetty -L 57200 ttyS1 vt102" >> /etc/inittab
+echo "S1:12345:respawn:/sbin/agetty -L 57600 ttyS1 vt102" >> /etc/inittab
# bug ?
chown root.root /var/lib/empty
|