Remove dhcpcd and associated options
This commit is contained in:
parent
9fc1385eb7
commit
8dd23cbc1d
@ -195,9 +195,9 @@ The following environment variables are supported:
|
|||||||
stays activated. `FIRST_USER_PASS` must be set for this to work. Please be aware of the implied
|
stays activated. `FIRST_USER_PASS` must be set for this to work. Please be aware of the implied
|
||||||
security risk of defining a default username and password for your devices.
|
security risk of defining a default username and password for your devices.
|
||||||
|
|
||||||
* `WPA_ESSID`, `WPA_PASSWORD` and `WPA_COUNTRY` (Default: unset)
|
* `WPA_COUNTRY` (Default: unset)
|
||||||
|
|
||||||
If these are set, they are use to configure `wpa_supplicant.conf`, so that the Raspberry Pi can automatically connect to a wireless network on first boot. If `WPA_ESSID` is set and `WPA_PASSWORD` is unset an unprotected wireless network will be configured. If set, `WPA_PASSWORD` must be between 8 and 63 characters. `WPA_COUNTRY` is a 2-letter ISO/IEC 3166 country Code, i.e. `GB`
|
Sets the default WLAN regulatory domain and unblocks WLAN interfaces. This should be a 2-letter ISO/IEC 3166 country Code, i.e. `GB`
|
||||||
|
|
||||||
* `ENABLE_SSH` (Default: `0`)
|
* `ENABLE_SSH` (Default: `0`)
|
||||||
|
|
||||||
|
2
build.sh
2
build.sh
@ -227,8 +227,6 @@ export FIRST_USER_NAME=${FIRST_USER_NAME:-pi}
|
|||||||
export FIRST_USER_PASS
|
export FIRST_USER_PASS
|
||||||
export DISABLE_FIRST_BOOT_USER_RENAME=${DISABLE_FIRST_BOOT_USER_RENAME:-0}
|
export DISABLE_FIRST_BOOT_USER_RENAME=${DISABLE_FIRST_BOOT_USER_RENAME:-0}
|
||||||
export RELEASE=${RELEASE:-bookworm} # Don't forget to update stage0/prerun.sh
|
export RELEASE=${RELEASE:-bookworm} # Don't forget to update stage0/prerun.sh
|
||||||
export WPA_ESSID
|
|
||||||
export WPA_PASSWORD
|
|
||||||
export WPA_COUNTRY
|
export WPA_COUNTRY
|
||||||
export ENABLE_SSH="${ENABLE_SSH:-0}"
|
export ENABLE_SSH="${ENABLE_SSH:-0}"
|
||||||
export PUBKEY_ONLY_SSH="${PUBKEY_ONLY_SSH:-0}"
|
export PUBKEY_ONLY_SSH="${PUBKEY_ONLY_SSH:-0}"
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
wpasupplicant wireless-tools firmware-atheros firmware-brcm80211 firmware-libertas firmware-misc-nonfree firmware-realtek
|
wpasupplicant wireless-tools firmware-atheros firmware-brcm80211 firmware-libertas firmware-misc-nonfree firmware-realtek
|
||||||
raspberrypi-net-mods
|
raspberrypi-net-mods
|
||||||
dhcpcd5
|
|
||||||
network-manager
|
network-manager
|
||||||
net-tools
|
net-tools
|
||||||
|
@ -3,32 +3,12 @@
|
|||||||
install -v -d "${ROOTFS_DIR}/etc/wpa_supplicant"
|
install -v -d "${ROOTFS_DIR}/etc/wpa_supplicant"
|
||||||
install -v -m 600 files/wpa_supplicant.conf "${ROOTFS_DIR}/etc/wpa_supplicant/"
|
install -v -m 600 files/wpa_supplicant.conf "${ROOTFS_DIR}/etc/wpa_supplicant/"
|
||||||
|
|
||||||
on_chroot << EOF
|
|
||||||
SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_boot_wait 0
|
|
||||||
SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_netconf 1
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if [ -v WPA_COUNTRY ]; then
|
if [ -v WPA_COUNTRY ]; then
|
||||||
on_chroot <<- EOF
|
on_chroot <<- EOF
|
||||||
SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_wifi_country "${WPA_COUNTRY}"
|
SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_wifi_country "${WPA_COUNTRY}"
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -v WPA_ESSID ] && [ -v WPA_PASSWORD ]; then
|
|
||||||
on_chroot <<EOF
|
|
||||||
set -o pipefail
|
|
||||||
wpa_passphrase "${WPA_ESSID}" "${WPA_PASSWORD}" | tee -a "/etc/wpa_supplicant/wpa_supplicant.conf"
|
|
||||||
EOF
|
|
||||||
elif [ -v WPA_ESSID ]; then
|
|
||||||
cat >> "${ROOTFS_DIR}/etc/wpa_supplicant/wpa_supplicant.conf" << EOL
|
|
||||||
|
|
||||||
network={
|
|
||||||
ssid="${WPA_ESSID}"
|
|
||||||
key_mgmt=NONE
|
|
||||||
}
|
|
||||||
EOL
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Disable wifi on 5GHz models if WPA_COUNTRY is not set
|
# Disable wifi on 5GHz models if WPA_COUNTRY is not set
|
||||||
mkdir -p "${ROOTFS_DIR}/var/lib/systemd/rfkill/"
|
mkdir -p "${ROOTFS_DIR}/var/lib/systemd/rfkill/"
|
||||||
if [ -n "$WPA_COUNTRY" ]; then
|
if [ -n "$WPA_COUNTRY" ]; then
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash -e
|
|
||||||
|
|
||||||
on_chroot << EOF
|
|
||||||
SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_boot_wait 1
|
|
||||||
EOF
|
|
Loading…
x
Reference in New Issue
Block a user