Customize dnsmasq.conf dhcpcd.conf common.sh dhcp.php and insert line in armbianEnv.txt to support secondary DHCP server on R1 eth1.

pull/35/head
necro-nemesis 6 years ago
parent 7912964fb0
commit 20b1c7cd00

@ -11,7 +11,16 @@ slaac private
nohook lookup-hostname nohook lookup-hostname
# LokiAP-WebGui wireless configuration # LokiAP-WebGui wireless configuration
{
interface wlan0 interface wlan0
static ip_address=10.3.141.1/24 static ip_address=10.3.141.1/24
static routers=10.3.141.1 static routers=10.3.141.1
static domain_name_server=1.1.1.1 127.3.2.1 static domain_name_server=1.1.1.1 127.3.2.1
}
//For Orange Pi R1 Secondary Ethernet Adapter
{
interface eth1
static ip_address=10.3.142.1/24
static routers=10.3.142.1
static domain_name_server=1.1.1.1 127.3.2.1
}

@ -1,5 +1,8 @@
interface=wlan0 except-interface=eth0
dhcp-range=10.3.141.1,10.3.141.24,255.255.255.0,12h //For Orange Pi R1 Secondary Ethernet Adapter
dhcp-range=eth1,10.3.142.1,10.3.142.24,255.255.255.0,12h
//
dhcp-range=wlan0,10.3.141.1,10.3.141.24,255.255.255.0,12h
bind-dynamic bind-dynamic
domain-needed domain-needed
bogus-priv bogus-priv

@ -109,10 +109,10 @@ function DisplayDHCPConfig() {
exec( 'cat '. RASPI_DNSMASQ_CONFIG, $return ); exec( 'cat '. RASPI_DNSMASQ_CONFIG, $return );
$conf = ParseConfig($return); $conf = ParseConfig($return);
$arrRange = explode( ",", $conf['dhcp-range'] ); $arrRange = explode( ",", $conf['dhcp-range'] );
$RangeStart = $arrRange[0]; $RangeStart = $arrRange[1];
$RangeEnd = $arrRange[1]; $RangeEnd = $arrRange[2];
$RangeMask = $arrRange[2]; $RangeMask = $arrRange[3];
$leaseTime = $arrRange[3]; $leaseTime = $arrRange[4];
$hselected = ''; $hselected = '';
$mselected = ''; $mselected = '';

@ -384,6 +384,12 @@ function optimize_php() {
fi fi
} }
function build_R1 () {
if [ strpos(file_get_contents("/etc/armbian-release"),'orangepi-r1') !== false]; then
sudo sed -i "1i extraargs=net.ifnames=0" /boot/armbianEnv.txt
fi
}
function install_complete() { function install_complete() {
install_log "Installation completed!" install_log "Installation completed!"
@ -417,5 +423,6 @@ function install_raspap() {
network_tables network_tables
default_configuration default_configuration
patch_system_files patch_system_files
build_R1
install_complete install_complete
} }

Loading…
Cancel
Save