source: hybrid/branches/releng-9.0/nanobsd/files/tools/dhcpd_snmp.sh@ 10841

Last change on this file since 10841 was 10841, checked in by rick, 13 years ago

Op het moment dat je inlogt met SSH op een normale proxy is je FIB=1, omdat
SSH op FIB=1 draait. Draai je dan handmatig dhclient vr0 zal dit je default
route op FIB=1 weer wissen, en dat is nu juist _niet_ de bedoeling.

Hard-coded de wis actie naar FIB=0 om zo altijd de goede te wissen.

Fixes nodefactory:ticket:172

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
File size: 360 bytes
Line 
1#!/bin/sh
2# Write dhcpd ranges to dhcpd-snmp.conf
3
4DHCPD="/usr/local/etc/dhcpd.conf"
5DHSNMP="/usr/local/etc/dhcpd-snmp.conf"
6INDEX="0"
7
8DHPOOL=`cat ${DHCPD} | grep range | awk '{print $2"-"$3}' | cut -d";" -f1`
9for range in ${DHPOOL}
10do
11 $((INDEX=INDEX+1))
12 echo "`echo "pool:" $INDEX", pool"$INDEX", "$range | \
13 sed 's/^.*(//'`" >> $DHSNMP
14done
15
Note: See TracBrowser for help on using the repository browser.