mirror of
https://github.com/RobotechLille/cdf2018-principal
synced 2025-09-07 18:30:24 +02:00
Remote connection via PPPoE
This commit is contained in:
parent
ad736b1a0e
commit
832306706d
4 changed files with 27 additions and 10 deletions
|
@ -11,11 +11,17 @@ then
|
|||
|
||||
# Network configuration
|
||||
echo -e "
|
||||
auto eth0
|
||||
iface eth0 inet static
|
||||
address ${ETHADDRESS}
|
||||
netmask 255.255.255.0
|
||||
peer ${ETHPEER}
|
||||
gateway ${ETHPEER}
|
||||
|
||||
auto wlan0
|
||||
iface wlan0 inet static
|
||||
address $ADDRESS
|
||||
netmask $NETMASK
|
||||
gateway $GATEWAY
|
||||
iface wlan0 inet dhcp
|
||||
pre-up wpa_supplicant -D wext -B -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -P /var/run/wpa_supplicant.pid
|
||||
pre-down start-stop-daemon -K -q -p /var/run/wpa_supplicant.pid
|
||||
" >> ${TARGET_DIR}/etc/network/interfaces
|
||||
|
||||
# SSH configuration
|
||||
|
|
|
@ -7,15 +7,12 @@ start() {
|
|||
printf "Starting Wi-Fi connection: "
|
||||
# modprobe brcmfmac
|
||||
modprobe r8188eu
|
||||
ip link set wlan0 up
|
||||
wpa_supplicant -D wext -B -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -P /var/run/wpa_supplicant.pid
|
||||
ifup wlan0
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf "Stopping Wi-Fi connection: "
|
||||
start-stop-daemon -K -q -p /var/run/wpa_supplicant.pid
|
||||
ifdown wlan0
|
||||
# rmmod brcmfmac
|
||||
rmmod r8188eu
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue