@@ -48,32 +48,32 @@
cat >> /etc/sysconfig/network/scripts/logserver-up.sh <<EOF
#!/bin/bash
-SCRIPTNAME=$0
+SCRIPTNAME=\$0
function get_logserver {
sleep 2
- DHCPINFOFILE=`grep -H ^LOGSERVER /var/lib/dhcpcd/*.info |awk -F: '{print $1}'`
- if [ -f "${DHCPINFOFILE}" ] ; then
- . ${DHCPINFOFILE}
+ DHCPINFOFILE=`grep -H ^LOGSERVER /var/lib/dhcpcd/*.info |awk -F: '{print \$1}'`
+ if [ -f "\${DHCPINFOFILE}" ] ; then
+ . \${DHCPINFOFILE}
export LOGSERVER
- echo ${LOGSERVER}
+ echo \${LOGSERVER}
else
echo "localhost"
fi
}
function add_logserver {
- LOGHOST=`get_logserver`
- case ${LOGHOST} in
+ 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
+ if [ -z "\`grep \${LOGHOST} /etc/syslog-ng/syslog-ng.conf\`" ] ; then
echo "
destination loghost {
- udp(\"${LOGHOST}\" port (514));
+ udp("\${LOGHOST}" port (514));
};
log { source(src); destination(loghost); };
" >> /etc/syslog-ng/syslog-ng.conf
@@ -87,7 +87,7 @@
}
-case $SCRIPTNAME in
+case \$SCRIPTNAME in
*if-up.d*)
add_logserver
;;
|