source: hybrid/branches/releng-9/nanobsd/files/tools/dhcpd_snmp.sh@ 12751

Last change on this file since 12751 was 12751, checked in by ed, 11 years ago

THIS script adds the config from GENESIS to this operating system
make sure you know what you are doing, if not press control-C
ENTER CONFIG NAME ......(and press enter)

Name [HybridEd]:
# INFO: Working on file: 'authorized_keys'
# INFO: Working on file: 'dhcpd.conf'
# INFO: Working on file: 'dnsmasq.conf'
# INFO: Working on file: 'motd'
# INFO: Working on file: 'rc.conf.local'
fetch: http://wirelessleiden.nl/config//HybridEd/hybrid.conf.local: Internal Server Error

This must be:
fetch: http://wirelessleiden.nl/config//HybridEd/pf.hybrid.conf.local

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