[svn-commits] sruffell: tools/trunk r4536 - /tools/trunk/ifup-hdlc

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jul 3 16:04:41 CDT 2008


Author: sruffell
Date: Thu Jul  3 16:04:41 2008
New Revision: 4536

URL: http://svn.digium.com/view/dahdi?view=rev&rev=4536
Log:
Adding the ifup-hdlc script, which is needed for "make config"

Added:
    tools/trunk/ifup-hdlc   (with props)

Added: tools/trunk/ifup-hdlc
URL: http://svn.digium.com/view/dahdi/tools/trunk/ifup-hdlc?view=auto&rev=4536
==============================================================================
--- tools/trunk/ifup-hdlc (added)
+++ tools/trunk/ifup-hdlc Thu Jul  3 16:04:41 2008
@@ -1,0 +1,39 @@
+#!/bin/sh
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+cd /etc/sysconfig/network-scripts
+. network-functions
+
+CONFIG=$1
+source_config
+
+if [ "foo$2" = "fooboot" -a "${ONBOOT}" = "no" ]
+then
+	exit
+fi
+
+if [ -z "${MODE}" ]; then
+	echo "No mode specified!"
+	exit
+fi
+
+sethdlc ${DEVICE} mode ${MODE}
+ifconfig ${DEVICE} ${IPADDR} pointopoint ${REMIP}
+route add -net ${NETWORK} netmask ${NETMASK} ${DEVICE}
+
+# this is broken! it's only here to keep compatibility with old RH sytstems
+if [ "${GATEWAY}" != "" -a "${GATEWAY}" != "none" ]
+then
+	route add default gw ${GATEWAY} metric 1 ${DEVICE}
+fi
+
+. /etc/sysconfig/network
+
+if [ "${GATEWAY}" != "" ]; then
+	if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then
+		# set up default gateway
+		route add default gw ${GATEWAY}
+	fi
+fi
+
+/etc/sysconfig/network-scripts/ifup-post $1

Propchange: tools/trunk/ifup-hdlc
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tools/trunk/ifup-hdlc
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: tools/trunk/ifup-hdlc
------------------------------------------------------------------------------
    svn:mime-type = text/plain




More information about the svn-commits mailing list