* Peter Uithoven <pe...@peteruithoven.nl> [29.06.2015 13:20]:
> We do a little bit of our own wifi config. We try to find (using scanlist)
> known wifi networks and connect to them, when non appropriate are found we
> create a accesspoint.
> In the future, when connecting to a known networks fails it should also
> become a accesspoint.

ok...then you can maybe with hotplug wait for ACTION='ifup'
maybe something like this (will not work, but you get the idea)

#!/bin/sh
# hotplug-script:

SCANNED='/your/path'
MYCHANNELS='1 2 3 154 168'

[ "$ACTION" = 'ifup' -a -e "$SCANNED" ] && {
        scan_for_known_networks | while read NETWORK_SETTINGS ; do
                connect $NETWORK_SETTINGS       # ssid, channel, pass etc.
                rm $SCANNED
        done
}

[ "$ACTION" = 'ifup' -a "$INTERFACE" = 'mywifi' ] && {
        for CHAN in $MYCHANNELS; do
                create_adhoc $CHAN
                touch 'SCANNED'
                wifi
        done
}

> If I understand the OpenWRT wiki hotplug is replaced by procd?

no. netifd will start hotplug if an interface comes up.

bye, bastian
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to