Update pi scripts
This commit is contained in:
@@ -28,3 +28,6 @@ else
|
||||
cp $(BR_PROJECT)/configs/buildroot.config $(BR_STAGING)/buildroot/.config; \
|
||||
fi
|
||||
endif
|
||||
|
||||
install.sd:
|
||||
sudo dd if=$(BR_STAGING)/buildroot/images/sdcard.img of=/dev/mmcblk0 && sync && sync
|
||||
|
||||
8
bsp/scripts/bridge_eth_wifi.sh
Executable file
8
bsp/scripts/bridge_eth_wifi.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
sudo iptables -t nat -A POSTROUTING -o wlp2s0 -s 192.168.2.0/24 -j MASQUERADE
|
||||
sudo bash -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
|
||||
sudo kill -9 dnsmasq
|
||||
sleep 1
|
||||
sudo dnsmasq -d -i eno1 -I lo --dhcp-range="192.168.2.100,192.168.2.150,12h" --dhcp-option="1,255.255.255.0" --dhcp-option="3,192.168.2.1"
|
||||
# -d to keep forground
|
||||
Reference in New Issue
Block a user