Advertisement
s243a

showScanWindow() - /usr/sbin/wag-profiles.sh

Oct 16th, 2016
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.66 KB | None | 0 0
  1. # lines 1748 to 1842 - /usr/sbin/wag-profile.sh - puppylinux
  2. # http://www.pearltrees.com/s243a/showscanwindow-sbin-profiles/id16473081
  3. showScanWindow()
  4. {
  5.     # do the cleanup here, so devices have a chance to "settle" before scanning
  6.     cleanUpInterface "$INTERFACE" >> $DEBUG_OUTPUT 2>&1
  7.     sleep 1
  8.     checkIsPCMCIA # sets IsPCMCIA
  9.     # Dougal: this replaces Xdialog at the end of the subshells in Build*ScanWindow
  10.     export NETWIZ_Scan_Progress_Dialog="<window title=\"$L_TITLE_Network_Wizard\" window-position=\"1\">
  11. <progressbar>
  12.  <label>\"$L_PROGRESS_Scanning_Wireless\"</label>
  13.  <input>i=1 ; while read bla ; do i=\$((i+33)) ; echo \$i ; done</input>
  14.  <action type=\"exit\">Ready</action>
  15. </progressbar>
  16. </window>"
  17.     # add waiting for pcmcia to "settle"...
  18.     [ -n "$IsPCMCIA" ] && waitForPCMCIA
  19.     if [ "$USE_WLAN_NG" = "yes" ] ; then
  20.       buildPrismScanWindow
  21.     else
  22.       buildScanWindow
  23.     fi
  24.     SCANWINDOW_RESPONSE="$(sh /tmp/net-setup_scanwindow)"
  25.     # add support for trying again with pcmcia cards
  26.     case $? in
  27.      101)
  28.       pccardctl eject
  29.       pccardctl insert
  30.       [ -n "$IsPCMCIA" ] && waitForPCMCIA
  31.       if [ "$USE_WLAN_NG" = "yes" ] ; then
  32.         buildPrismScanWindow retry
  33.       else
  34.         buildScanWindow retry
  35.       fi
  36.       SCANWINDOW_RESPONSE="$(sh /tmp/net-setup_scanwindow)"
  37.       ;;
  38.      111)
  39.       [ -n "$IsPCMCIA" ] && waitForPCMCIA
  40.       if [ "$USE_WLAN_NG" = "yes" ] ; then
  41.         buildPrismScanWindow retry
  42.       else
  43.         buildScanWindow retry
  44.       fi
  45.       SCANWINDOW_RESPONSE="$(sh /tmp/net-setup_scanwindow)"
  46.       ;;
  47.     esac
  48.    
  49.     unset NETWIZ_Scan_Progress_Dialog
  50.     CELL=$(echo "$SCANWINDOW_RESPONSE" | grep -Eo "[0-9]+")
  51.     [ -n "$CELL" ] && setupScannedProfile
  52. } # end of showScanWindow
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement