-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
221 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
# This script installs wpa_supplicant if it's not installed. | ||
|
||
DATA_DIR="/data/wpa_supplicant" | ||
CONF_DIR="/etc/wpa_supplicant/conf" | ||
|
||
if ! dpkg -l wpasupplicant | grep ii >/dev/null; then | ||
apt update | ||
apt install -y libreadline8 wpasupplicant | ||
fi | ||
|
||
for file in CA.pem Client.pem PrivateKey.pem wpa_supplicant.conf; do | ||
if [ ! -f "${CONF_DIR}/${file}" ]; then | ||
cp "${DATA_DIR}/${file}" "${CONF_DIR}" | ||
fi | ||
done | ||
|
||
SERVICE_DIR=/etc/systemd/system/wpa_supplicant.service.d | ||
|
||
ONBOOT_DIR=/data/on_boot.d | ||
|
||
if [ ! -d "$ONBOOT_DIR" ]; then | ||
mkdir -p ${ONBOOT_DIR} | ||
fi | ||
|
||
if [ ! -d "$SERVICE_DIR" ]; then | ||
mkdir -p "${SERVICE_DIR}" | ||
fi | ||
|
||
cp "${DATA_DIR}"/override.conf "${SERVICE_DIR}/override.conf" | ||
|
||
systemctl daemon-reload | ||
systemctl enable wpa_supplicant.service | ||
systemctl restart wpa_supplicant.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=WPA supplicant | ||
Before=network.target | ||
After=dbus.service | ||
Wants=network.target | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
|
||
[Service] | ||
ExecStart= | ||
ExecStart=/sbin/wpa_supplicant -u -s -Dwired -i${wan_interface} -c/etc/wpa_supplicant/conf/wpa_supplicant.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=Setup ATT Bypass service | ||
Wants=network-online.target | ||
After=network-online.target | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/data/on_boot.d/0-att-bypass.sh | ||
RemainAfterExit=yes | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
eapol_version=1 | ||
ap_scan=0 | ||
fast_reauth=1 | ||
network={ | ||
ca_cert="/etc/wpa_supplicant/conf/CA.pem" | ||
client_cert="/etc/wpa_supplicant/conf/Client.pem" | ||
eap=TLS | ||
eapol_flags=0 | ||
identity="${mac_address}" # Internet (ONT) interface MAC address must match this value | ||
key_mgmt=IEEE8021X | ||
phase1="allow_canned_success=1" | ||
private_key="/etc/wpa_supplicant/conf/PrivateKey.pem" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters