diff --git a/lfsSetup.sh b/lfsSetup.sh index 2c139a4..5753f62 100755 --- a/lfsSetup.sh +++ b/lfsSetup.sh @@ -189,7 +189,7 @@ if [ -n "$NET_SCRIPT" ] ; then sed -i "/^\[Network\]/a DHCP=yes" "$NET_SCRIPT" sed -i "s/^.*PKR-LINUX.local/127.0.0.1 PKR-LINUX.local/" "$NET_SCRIPT" - if [ "$2" == "*wpa_supplicant*" ] ; then + if [[ $2 == *"wpa_supplicant"* ]] ; then sed -i "/^cat > \/etc\/systemd\/network/i cat > \/etc\/systemd\/network\/20-wlan0.network << \"EOF\"\n\[Match\]\nName=wlan0\n\n\[Network\]\nDHCP=yes\nEOF" "$NET_SCRIPT" sed -i "/20-wlan0.network/i mkdir -pv \/etc\/wpa_supplicant\ncat > \/etc\/wpa_supplicant\/wpa_supplicant-wlan0.conf << \"EOF\"\nnetwork=\{\nssid=\"T-E797F1\"\n#psk=\"Q2729eq9338qQJ7s\"\npsk=a41c0853c906d7db271a007af55afa9dce2efa8efa994d614b2d7b1d0b38bc72\n\}\nEOF" "$NET_SCRIPT" fi @@ -201,6 +201,6 @@ sed -i "/^rm -rf \$PKGDIR/s/^/#/" "$KERNEL_SCRIPT" sed -i "/^EOF$/a groupadd pkr\nuseradd -s /bin/bash -g pkr -m -k /dev/null pkr\nusermod -a -G audio,video,input,systemd-journal" "$KERNEL_SCRIPT" # Check if wpa_supplicant is required and patch its install script if yes -if [ "$2" == "*wpa_supplicant*" ] ; then +if [[ $2 == *"wpa_supplicant"* ]] ; then sed -i "/wpa_supplicant@/s/@.*/@wlan0/" "$(find "$1/blfs_root/scripts/" -type f -iname "*-wpa_supplicant")" fi \ No newline at end of file