working
This commit is contained in:
parent
13dce65128
commit
df2da8cfab
|
|
@ -39,7 +39,6 @@ apt-get install -y \
|
||||||
jq \
|
jq \
|
||||||
git \
|
git \
|
||||||
locales \
|
locales \
|
||||||
network-manager \
|
|
||||||
wpasupplicant \
|
wpasupplicant \
|
||||||
iproute2 \
|
iproute2 \
|
||||||
isc-dhcp-client \
|
isc-dhcp-client \
|
||||||
|
|
@ -64,12 +63,59 @@ apt-get install -y \
|
||||||
locale-gen en_US.UTF-8
|
locale-gen en_US.UTF-8
|
||||||
update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
|
update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
echo "====> configuring Wi-Fi for direct wpa_supplicant control"
|
echo "====> configuring bluetooth for Matter commissioning"
|
||||||
mkdir -p /etc/NetworkManager/conf.d
|
mkdir -p /etc/systemd/system/bluetooth.service.d
|
||||||
cat >/etc/NetworkManager/conf.d/10-unmanaged-wifi.conf <<'EONM'
|
cat >/etc/systemd/system/bluetooth.service.d/10-matter.conf <<'EOBT'
|
||||||
[keyfile]
|
[Service]
|
||||||
unmanaged-devices=type:wifi
|
ExecStart=
|
||||||
EONM
|
ExecStart=/usr/libexec/bluetooth/bluetoothd -E -P battery
|
||||||
|
EOBT
|
||||||
|
systemctl enable bluetooth.service
|
||||||
|
|
||||||
|
echo "====> configuring wlan0 for wpa_supplicant + systemd-networkd"
|
||||||
|
apt-get purge -y network-manager || true
|
||||||
|
systemctl disable NetworkManager.service NetworkManager-wait-online.service NetworkManager-dispatcher.service || true
|
||||||
|
systemctl mask NetworkManager.service NetworkManager-wait-online.service NetworkManager-dispatcher.service || true
|
||||||
|
|
||||||
|
mkdir -p /etc/wpa_supplicant
|
||||||
|
cat >/etc/wpa_supplicant/wpa_supplicant-wlan0.conf <<'EOWPA'
|
||||||
|
ctrl_interface=DIR=/run/wpa_supplicant GROUP=netdev
|
||||||
|
update_config=1
|
||||||
|
EOWPA
|
||||||
|
chmod 0600 /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
|
||||||
|
|
||||||
|
mkdir -p /etc/systemd/system/wpa_supplicant.service.d
|
||||||
|
cat >/etc/systemd/system/wpa_supplicant.service.d/10-wlan0.conf <<'EOSD'
|
||||||
|
[Unit]
|
||||||
|
Requires=sys-subsystem-net-devices-wlan0.device
|
||||||
|
After=sys-subsystem-net-devices-wlan0.device
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=
|
||||||
|
ExecStart=/usr/sbin/wpa_supplicant -u -s -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant-wlan0.conf -O "DIR=/run/wpa_supplicant GROUP=netdev"
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=2s
|
||||||
|
EOSD
|
||||||
|
|
||||||
|
mkdir -p /etc/systemd/network
|
||||||
|
cat >/etc/systemd/network/00-wlan0.network <<'EONET'
|
||||||
|
[Match]
|
||||||
|
Name=wlan0
|
||||||
|
|
||||||
|
[Link]
|
||||||
|
RequiredForOnline=no
|
||||||
|
|
||||||
|
[Network]
|
||||||
|
DHCP=yes
|
||||||
|
IPv6AcceptRA=yes
|
||||||
|
|
||||||
|
[DHCPv4]
|
||||||
|
RouteMetric=600
|
||||||
|
EONET
|
||||||
|
|
||||||
|
systemctl enable wpa_supplicant.service
|
||||||
|
systemctl enable systemd-networkd.service
|
||||||
|
systemctl enable systemd-resolved.service
|
||||||
|
|
||||||
echo "====> creating toes user"
|
echo "====> creating toes user"
|
||||||
if id -u toes >/dev/null 2>&1; then
|
if id -u toes >/dev/null 2>&1; then
|
||||||
|
|
@ -96,7 +142,7 @@ echo "====> installing rgbled"
|
||||||
curl -fsSL https://git.nose.space/nakajima/rgbled/releases/download/v0.1.1/install.sh | bash
|
curl -fsSL https://git.nose.space/nakajima/rgbled/releases/download/v0.1.1/install.sh | bash
|
||||||
|
|
||||||
echo "====> installing matter stack"
|
echo "====> installing matter stack"
|
||||||
curl -fsSL https://git.fishmt.net/nakajima/toes-matter/releases/download/v0.1.1/install.sh | sh
|
curl -fsSL https://git.fishmt.net/nakajima/toes-matter/releases/download/latest/install.sh | sh
|
||||||
if [ ! -x /usr/local/bin/toes-matter ]; then
|
if [ ! -x /usr/local/bin/toes-matter ]; then
|
||||||
echo "missing /usr/local/bin/toes-matter after install" >&2
|
echo "missing /usr/local/bin/toes-matter after install" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user