source: hybrid/branches/releng-11/nanobsd/files/tools/dhcpd_snmp.sh@ 13725

Last change on this file since 13725 was 13725, checked in by rick, 8 years ago

Wrong resolv.conf leaves other files dangling, causing cascading failure.

Config files are downloaded in order, since resolv.conf should be downloaded
last, as the system will use this file to download for example the unbound
setup. Without either of them there is no working system possible.

  • 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.