Initial commit
This commit is contained in:
53
backup/etc/config/dhcp
Normal file
53
backup/etc/config/dhcp
Normal file
@@ -0,0 +1,53 @@
|
||||
|
||||
config dnsmasq
|
||||
option domainneeded '1'
|
||||
option boguspriv '1'
|
||||
option filterwin2k '0'
|
||||
option localise_queries '1'
|
||||
option rebind_protection '1'
|
||||
option rebind_localhost '1'
|
||||
option local '/lan/'
|
||||
option domain 'lan'
|
||||
option expandhosts '1'
|
||||
option nonegcache '0'
|
||||
option cachesize '1000'
|
||||
option authoritative '1'
|
||||
option readethers '1'
|
||||
option leasefile '/tmp/dhcp.leases'
|
||||
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
|
||||
option nonwildcard '1'
|
||||
option localservice '1'
|
||||
option ednspacket_max '1232'
|
||||
option filter_aaaa '0'
|
||||
option filter_a '0'
|
||||
|
||||
config dhcp 'lan'
|
||||
option interface 'lan'
|
||||
option start '100'
|
||||
option limit '150'
|
||||
option leasetime '12h'
|
||||
option dhcpv4 'server'
|
||||
option dhcpv6 'server'
|
||||
option ra 'server'
|
||||
option ra_slaac '1'
|
||||
list ra_flags 'managed-config'
|
||||
list ra_flags 'other-config'
|
||||
option ignore '1'
|
||||
|
||||
config dhcp 'wan'
|
||||
option interface 'wan'
|
||||
option ignore '1'
|
||||
|
||||
config odhcpd 'odhcpd'
|
||||
option maindhcp '0'
|
||||
option leasefile '/tmp/hosts/odhcpd'
|
||||
option leasetrigger '/usr/sbin/odhcpd-update'
|
||||
option loglevel '4'
|
||||
option piofolder '/tmp/odhcpd-piofolder'
|
||||
|
||||
config dhcp 'wifi_ap'
|
||||
option interface 'wifi_ap'
|
||||
option start '100'
|
||||
option limit '100'
|
||||
option leasetime '12h'
|
||||
|
||||
60
backup/etc/config/network
Normal file
60
backup/etc/config/network
Normal file
@@ -0,0 +1,60 @@
|
||||
|
||||
config interface 'loopback'
|
||||
option device 'lo'
|
||||
option proto 'static'
|
||||
option ipaddr '127.0.0.1'
|
||||
option netmask '255.0.0.0'
|
||||
|
||||
config globals 'globals'
|
||||
option ula_prefix 'fd6b:e811:df87::/48'
|
||||
option packet_steering '1'
|
||||
|
||||
config device
|
||||
option name 'br-lan'
|
||||
option type 'bridge'
|
||||
list ports 'eth0.1'
|
||||
list ports 'eth1'
|
||||
|
||||
config device
|
||||
option name 'eth0.1'
|
||||
option macaddr '4c:5e:0c:b5:35:f3'
|
||||
|
||||
config interface 'lan'
|
||||
option device 'br-lan'
|
||||
option proto 'static'
|
||||
option ipaddr '20.0.0.26'
|
||||
option netmask '255.255.255.0'
|
||||
option gateway '20.0.0.1'
|
||||
list dns '64.126.133.1'
|
||||
|
||||
config switch
|
||||
option name 'switch0'
|
||||
option reset '1'
|
||||
option enable_vlan '1'
|
||||
|
||||
config switch_vlan
|
||||
option device 'switch0'
|
||||
option vlan '1'
|
||||
option ports '1 2 3 4 0t'
|
||||
|
||||
config interface 'wifi_ap'
|
||||
option proto 'static'
|
||||
option ipaddr '192.168.88.1'
|
||||
option netmask '255.255.255.0'
|
||||
|
||||
config device 'br_lan_dev'
|
||||
option name 'br-lan'
|
||||
option type 'bridge'
|
||||
list ports 'eth0.1'
|
||||
list ports 'eth1'
|
||||
|
||||
config switch 'switch'
|
||||
option name 'switch0'
|
||||
option reset '1'
|
||||
option enable_vlan '1'
|
||||
|
||||
config switch_vlan 'switch_vlan1'
|
||||
option device 'switch0'
|
||||
option vlan '1'
|
||||
option ports '1 2 3 4 0t'
|
||||
|
||||
8
backup/etc/config/nut_cgi
Normal file
8
backup/etc/config/nut_cgi
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
config upsset
|
||||
|
||||
config host 'tripplite'
|
||||
option upsname 'tripplite'
|
||||
option hostname 'localhost'
|
||||
option displayname 'Local UPS'
|
||||
|
||||
17
backup/etc/config/nut_monitor
Normal file
17
backup/etc/config/nut_monitor
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
config upsmon 'upsmon'
|
||||
option minsupplies '1'
|
||||
option shutdowncmd '/sbin/halt'
|
||||
option pollfreq '5'
|
||||
option pollfreqalert '5'
|
||||
option hostsync '15'
|
||||
option deadtime '15'
|
||||
option finaldelay '5'
|
||||
|
||||
config master 'tripplite'
|
||||
option upsname 'tripplite'
|
||||
option hostname 'localhost'
|
||||
option powervalue '1'
|
||||
option username 'upsmon'
|
||||
option password 'nutlocal'
|
||||
|
||||
24
backup/etc/config/nut_server
Normal file
24
backup/etc/config/nut_server
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
config driver 'tripplite'
|
||||
option driver 'usbhid-ups'
|
||||
option port 'auto'
|
||||
option desc 'Local UPS'
|
||||
option pollinterval '5'
|
||||
option vendorid '09ae'
|
||||
option productid '3015'
|
||||
|
||||
config listen_address 'listen1'
|
||||
option address '127.0.0.1'
|
||||
|
||||
config user 'upsmon_user'
|
||||
option username 'upsmon'
|
||||
option password 'nutlocal'
|
||||
option upsmon 'master'
|
||||
|
||||
config user
|
||||
option username 'monitor'
|
||||
option upsmon 'slave'
|
||||
|
||||
config listen_address
|
||||
option address '0.0.0.0'
|
||||
|
||||
139
backup/etc/config/snmpd
Normal file
139
backup/etc/config/snmpd
Normal file
@@ -0,0 +1,139 @@
|
||||
|
||||
config agent
|
||||
option agentaddress 'UDP:161,UDP6:161'
|
||||
|
||||
config agentx
|
||||
option agentxsocket '/var/run/agentx.sock'
|
||||
|
||||
config com2sec 'public'
|
||||
option secname 'ro'
|
||||
option source 'default'
|
||||
option community 'fsr'
|
||||
|
||||
config com2sec 'private'
|
||||
option secname 'rw'
|
||||
option source 'localhost'
|
||||
option community 'private'
|
||||
|
||||
config com2sec6 'public6'
|
||||
option secname 'ro'
|
||||
option source 'default'
|
||||
option community 'fsr'
|
||||
|
||||
config com2sec6 'private6'
|
||||
option secname 'rw'
|
||||
option source 'localhost'
|
||||
option community 'private'
|
||||
|
||||
config group 'public_v1'
|
||||
option group 'public'
|
||||
option version 'v1'
|
||||
option secname 'ro'
|
||||
|
||||
config group 'public_v2c'
|
||||
option group 'public'
|
||||
option version 'v2c'
|
||||
option secname 'ro'
|
||||
|
||||
config group 'public_usm'
|
||||
option group 'public'
|
||||
option version 'usm'
|
||||
option secname 'ro'
|
||||
|
||||
config group 'private_v1'
|
||||
option group 'private'
|
||||
option version 'v1'
|
||||
option secname 'rw'
|
||||
|
||||
config group 'private_v2c'
|
||||
option group 'private'
|
||||
option version 'v2c'
|
||||
option secname 'rw'
|
||||
|
||||
config group 'private_usm'
|
||||
option group 'private'
|
||||
option version 'usm'
|
||||
option secname 'rw'
|
||||
|
||||
config view 'all'
|
||||
option viewname 'all'
|
||||
option type 'included'
|
||||
option oid '.1'
|
||||
|
||||
config access 'public_access'
|
||||
option group 'public'
|
||||
option context 'none'
|
||||
option version 'any'
|
||||
option level 'noauth'
|
||||
option prefix 'exact'
|
||||
option read 'all'
|
||||
option write 'none'
|
||||
option notify 'none'
|
||||
|
||||
config access 'private_access'
|
||||
option group 'private'
|
||||
option context 'none'
|
||||
option version 'any'
|
||||
option level 'noauth'
|
||||
option prefix 'exact'
|
||||
option read 'all'
|
||||
option write 'all'
|
||||
option notify 'all'
|
||||
|
||||
config system
|
||||
option sysLocation 'office'
|
||||
option sysContact 'bofh@example.com'
|
||||
option sysName 'HeartOfGold'
|
||||
|
||||
config exec
|
||||
option name 'filedescriptors'
|
||||
option prog '/bin/cat'
|
||||
option args '/proc/sys/fs/file-nr'
|
||||
|
||||
config engineid
|
||||
option engineidtype '3'
|
||||
option engineidnic 'eth0'
|
||||
|
||||
config snmpd 'general'
|
||||
option enabled '1'
|
||||
|
||||
config extend 'battery_charge'
|
||||
option name 'battery_charge'
|
||||
option prog '/usr/bin/upsc'
|
||||
option args 'tripplite@localhost battery.charge'
|
||||
|
||||
config extend 'battery_runtime'
|
||||
option name 'battery_runtime'
|
||||
option prog '/usr/bin/upsc'
|
||||
option args 'tripplite@localhost battery.runtime'
|
||||
|
||||
config extend 'ups_load'
|
||||
option name 'ups_load'
|
||||
option prog '/usr/bin/upsc'
|
||||
option args 'tripplite@localhost ups.load'
|
||||
|
||||
config extend 'input_voltage'
|
||||
option name 'input_voltage'
|
||||
option prog '/usr/bin/upsc'
|
||||
option args 'tripplite@localhost input.voltage'
|
||||
|
||||
config extend 'output_voltage'
|
||||
option name 'output_voltage'
|
||||
option prog '/usr/bin/upsc'
|
||||
option args 'tripplite@localhost output.voltage'
|
||||
|
||||
config extend 'ups_status'
|
||||
option name 'ups_status'
|
||||
option prog '/usr/bin/upsc'
|
||||
option args 'tripplite@localhost ups.status'
|
||||
|
||||
config extend 'battery_temp'
|
||||
option name 'battery_temp'
|
||||
option prog '/usr/bin/upsc'
|
||||
option args 'tripplite@localhost battery.temperature'
|
||||
|
||||
config extend 'battery_voltage'
|
||||
option name 'battery_voltage'
|
||||
option prog '/usr/bin/upsc'
|
||||
option args 'tripplite@localhost battery.voltage'
|
||||
|
||||
17
backup/etc/config/wireless
Normal file
17
backup/etc/config/wireless
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
config wifi-device 'radio0'
|
||||
option type 'mac80211'
|
||||
option path 'platform/ahb/18100000.wmac'
|
||||
option band '2g'
|
||||
option channel '1'
|
||||
option htmode 'HT20'
|
||||
option disabled '0'
|
||||
|
||||
config wifi-iface 'default_radio0'
|
||||
option device 'radio0'
|
||||
option network 'wifi_ap'
|
||||
option mode 'ap'
|
||||
option ssid 'First Step Internet'
|
||||
option encryption 'psk2'
|
||||
option key '12345678'
|
||||
|
||||
21
backup/etc/hotplug.d/usb/99-nut-ups
Normal file
21
backup/etc/hotplug.d/usb/99-nut-ups
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
# Auto-restart NUT when Tripp Lite UPS is plugged/unplugged
|
||||
UPS_VENDOR="09ae"
|
||||
|
||||
case "$ACTION" in
|
||||
add)
|
||||
if echo "$PRODUCT" | grep -qi "^${UPS_VENDOR}"; then
|
||||
# Fix USB device permissions so NUT driver (nut user) can access it
|
||||
[ -n "$DEVNAME" ] && chmod 0660 "/dev/$DEVNAME" && chown root:nut "/dev/$DEVNAME"
|
||||
logger -t NUT "Tripp Lite UPS connected (PRODUCT=$PRODUCT) - restarting NUT"
|
||||
sleep 3
|
||||
/etc/init.d/nut-server restart
|
||||
fi
|
||||
;;
|
||||
remove)
|
||||
if echo "$PRODUCT" | grep -qi "^${UPS_VENDOR}"; then
|
||||
logger -t NUT "Tripp Lite UPS disconnected - restarting NUT"
|
||||
/etc/init.d/nut-server restart
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
8
backup/etc/rc.local
Normal file
8
backup/etc/rc.local
Normal file
@@ -0,0 +1,8 @@
|
||||
# Put your custom commands here that should be executed once
|
||||
# the system init finished. By default this file does nothing.
|
||||
|
||||
mkdir -p /var/etc/nut
|
||||
chgrp nut /var/etc/nut
|
||||
chmod 750 /var/etc/nut
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user