@@ -46,56 +46,6 @@
NETCONFIG_NTP_POLICY="auto"
EOF
-cat >> /etc/sysconfig/network/scripts/logserver-up.sh <<EOF
-#!/bin/bash
-SCRIPTNAME=\$0
-
-function get_logserver {
- sleep 2
- 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
|