diff options
Diffstat (limited to 'recipes-kernel/rs9113/files/rs9113/wpa_supplicant')
-rwxr-xr-x | recipes-kernel/rs9113/files/rs9113/wpa_supplicant | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/recipes-kernel/rs9113/files/rs9113/wpa_supplicant b/recipes-kernel/rs9113/files/rs9113/wpa_supplicant deleted file mode 100755 index 6aa6456..0000000 --- a/recipes-kernel/rs9113/files/rs9113/wpa_supplicant +++ /dev/null @@ -1,95 +0,0 @@ -#! /bin/sh -# wpa_supplicant -# Example for /etc/init.d -# MTS -# -PATH=/sbin:/bin:/usr/bin:/usr/sbin -PIDFILE=/var/run/wpa_suplicant -CONF=/etc/wpa_supplicant/psk5g.conf -TIMELIMIT=60 -DRIVERNAME=wifi0 -upinterface() { - ((loopcount=1)) - while ((loopcount < TIMELIMIT)) ; do - if [[ $(iw dev ${DRIVERNAME} link) =~ "Connected to " ]] ; then - break; - fi - sleep 1 - ((loopcount++)) - done - ((loopcount=1)) - while ((loopcount < TIMELIMIT)) ; do - ldifs="$IFS" - IFS=$'\n' - result=($(ifup wifi0 2>&1)) - oldifs="$IFS" - show=$(ip addr show) - if [[ ${show} =~ [[:space:]]+inet[[:space:]]*[0-9].*[[:space:]]+global[[:space:]]+wifi0[[:space:]] ]] ; then - break - fi - ifdown wifi0 - sleep 1 - ((loopcount++)) - done - for (( i=0; i < ${#result[@]}; i++ )); do - if [[ ${result[i]} =~ ^[[:space:]]*$ ]] ; then - continue; - fi - logger -t ifup -p daemon.info "${result[i]}" - done -} - -# ntpd init.d script for ntpdc from ntp.isc.org -test -x /usr/sbin/wpa_supplicant -a -r $CONF || exit 0 -if ! [[ -r $CONF ]] ; then - logger -s -t wpa_supplicant -p daemon.err "Cannot find configuration file $CONF" -fi -test -r /etc/default/rcS && . /etc/default/rcS - -# Functions to do individual actions -startdaemon(){ - echo -n "Starting wpa_supplicant: " - /opt/rs9113/onebox_util rpine0 enable_protocol 1 - /opt/rs9113/onebox_util rpine0 set_country 840 - /opt/rs9113/onebox_util rpine0 create_vap ${DRIVERNAME} sta sw_bmiss >/dev/null 2>&1 - start-stop-daemon --start -x wpa_supplicant -- -i ${DRIVERNAME} -D nl80211 -P $PIDFILE /var/run/ -B -c $CONF -} -stopdaemon(){ - echo -n "Stopping ntpd: " - start-stop-daemon --stop -p $PIDFILE - echo "done" -} - -case "$1" in - start) - if ! [[ -f ${CONF} ]] ; then - echo "Skipping. Configuration file ${CONF} not found." - exit 1 - fi - startdaemon - { upinterface & } - ;; - stop) - ifdown ${DRIVERNAME} >/dev/null 2>&1 - stopdaemon - ;; - force-reload) - stopdaemon - startdaemon - ;; - restart) - # Don't reset the tick here - stopdaemon - startdaemon - ;; - reload) - stopdaemon - startdaemon - ;; - *) - echo "Usage: wpa_supplicant { start | stop | restart | reload }" >&2 - exit 1 - ;; -esac - -exit 0 |