[svn-commits] sruffell: tools/trunk r4536 - /tools/trunk/ifu…

Top Page

Reply to this message
Author: SVN commits to the Digium repositories
Date:  
To: dahdi-commits, svn-commits
Subject: [svn-commits] sruffell: tools/trunk r4536 - /tools/trunk/ifup-hdlc
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



_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--


svn-commits mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/svn-commits