Message ID | 20220705073206.1442280-5-angelo@amarulasolutions.com |
---|---|
State | Superseded |
Headers | show |
Series | Configure default wifi through kconfig | expand |
>>>>> "Angelo" == Angelo Compagnucci <angelo@amarulasolutions.com> writes: > Add a proper wpa-conf line to the interfaces files to let the system > bringup the wifi interface and the related wpa supplicant. > Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com> > --- > Changes: > v3: > * add "|| true" lo let the command exit without error when > BR2_SYSTEM_CONNECT_WIFI is empty (me) > package/ifupdown-scripts/ifupdown-scripts.mk | 2 ++ > 1 file changed, 2 insertions(+) > diff --git a/package/ifupdown-scripts/ifupdown-scripts.mk b/package/ifupdown-scripts/ifupdown-scripts.mk > index 5ef032142c..ebaf234143 100644 > --- a/package/ifupdown-scripts/ifupdown-scripts.mk > +++ b/package/ifupdown-scripts/ifupdown-scripts.mk > @@ -28,6 +28,8 @@ define IFUPDOWN_SCRIPTS_DHCP > echo " pre-up /etc/network/nfs_check"; \ > echo " wait-delay 15"; \ > echo " hostname \$$(hostname)"; \ > + test -n "$(BR2_SYSTEM_CONNECT_WIFI)" && \ > + echo " wpa-conf /etc/wpa_supplicant.conf" || true; \ > ) >> $(TARGET_DIR)/etc/network/interfaces Maybe we should do this unconditionally if we overwrite /etc/network/interfaces and wpa_supplicant is enabled?
On Sun, Sep 18, 2022 at 12:03 PM Peter Korsgaard <peter@korsgaard.com> wrote: > >>>>> "Angelo" == Angelo Compagnucci <angelo@amarulasolutions.com> writes: > > > Add a proper wpa-conf line to the interfaces files to let the system > > bringup the wifi interface and the related wpa supplicant. > > > Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com> > > --- > > Changes: > > v3: > > * add "|| true" lo let the command exit without error when > > BR2_SYSTEM_CONNECT_WIFI is empty (me) > > > package/ifupdown-scripts/ifupdown-scripts.mk | 2 ++ > > 1 file changed, 2 insertions(+) > > > diff --git a/package/ifupdown-scripts/ifupdown-scripts.mk > b/package/ifupdown-scripts/ifupdown-scripts.mk > > index 5ef032142c..ebaf234143 100644 > > --- a/package/ifupdown-scripts/ifupdown-scripts.mk > > +++ b/package/ifupdown-scripts/ifupdown-scripts.mk > > @@ -28,6 +28,8 @@ define IFUPDOWN_SCRIPTS_DHCP > > echo " pre-up /etc/network/nfs_check"; \ > > echo " wait-delay 15"; \ > > echo " hostname \$$(hostname)"; \ > > + test -n "$(BR2_SYSTEM_CONNECT_WIFI)" && \ > > + echo " wpa-conf /etc/wpa_supplicant.conf" || > true; \ > > ) >> $(TARGET_DIR)/etc/network/interfaces > > Maybe we should do this unconditionally if we overwrite > /etc/network/interfaces and wpa_supplicant is enabled? > Not entirely sure to understand this comment. We need to enable the "wpa-conf" line only when a user enables BR2_SYSTEM_CONNECT_WIFI. If a user overwrites /etc/network/interfaces in a overlay, he must ensure it is compiling also wpa_supplicant. Are suggesting to add code somewhere to check if a user enabled "wpa-conf" line in his own overlay and then enable wpa_supplicant package for him? > -- > Bye, Peter Korsgaard >
diff --git a/package/ifupdown-scripts/ifupdown-scripts.mk b/package/ifupdown-scripts/ifupdown-scripts.mk index 5ef032142c..ebaf234143 100644 --- a/package/ifupdown-scripts/ifupdown-scripts.mk +++ b/package/ifupdown-scripts/ifupdown-scripts.mk @@ -28,6 +28,8 @@ define IFUPDOWN_SCRIPTS_DHCP echo " pre-up /etc/network/nfs_check"; \ echo " wait-delay 15"; \ echo " hostname \$$(hostname)"; \ + test -n "$(BR2_SYSTEM_CONNECT_WIFI)" && \ + echo " wpa-conf /etc/wpa_supplicant.conf" || true; \ ) >> $(TARGET_DIR)/etc/network/interfaces endef define IFUPDOWN_SCRIPTS_DHCP_OPENRC
Add a proper wpa-conf line to the interfaces files to let the system bringup the wifi interface and the related wpa supplicant. Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com> --- Changes: v3: * add "|| true" lo let the command exit without error when BR2_SYSTEM_CONNECT_WIFI is empty (me) package/ifupdown-scripts/ifupdown-scripts.mk | 2 ++ 1 file changed, 2 insertions(+)