Advertisement
s243a

buildPrismScanWindow() - /usr/sbin/wag-profiles.sh - puppyli

Oct 16th, 2016
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.65 KB | None | 0 0
  1. # lines 2023 of 2061 of /usr/sbin/wag-profiles.sh
  2. # http://www.pearltrees.com/s243a/buildprismscanwindow/id16473098
  3. buildPrismScanWindow()
  4. {
  5.   SCANWINDOW_BUTTONS=""
  6.   (
  7.     # do a cleanup first (raises interface, so need to put it down after)
  8.     cleanUpInterface "$INTERFACE" >> $DEBUG_OUTPUT 2>&1
  9.     ifconfig "$INTERFACE" down
  10.     if runPrismScan "$INTERFACE" ; then
  11.       # create buttons (POINTNUM set in function)
  12.       for P in $(seq 0 $POINTNUM)
  13.       do
  14.         grep -Fq 'resultcode=success' /tmp/prism-scan$P || continue
  15.         getPrismCellParameters $P
  16.         [ "$CELL_ESSID" = "" ] && CELL_ESSID="$L_SCANWINDOW_Hidden_SSID"
  17.         # might add test here for some params, then maybe skip
  18.         SCANWINDOW_BUTTONS="${SCANWINDOW_BUTTONS} \"$P\" \"${CELL_ESSID} (${CELL_MODE}; ${L_SCANWINDOW_Encryption}${CELL_ENCRYPTION})\" off \"${L_SCANWINDOW_Channel}${CELL_CHANNEL}; ${L_SCANWINDOW_AP_MAC}${CELL_AP_MAC}\""
  19.       done
  20.     else
  21.       echo "X"
  22.     fi
  23.     if [ "$SCANWINDOW_BUTTONS" ] ; then
  24.         echo "Xdialog --left --item-help --stdout --title \"$L_TITLE_Puppy_Network_Wizard\" --radiolist \"$L_TEXT_Prism_Scan\"  20 60 4  \
  25.     ${SCANWINDOW_BUTTONS} 2> /dev/null" > /tmp/net-setup_scanwindow
  26.     else
  27.       #echo "Xdialog --left --title \"Puppy Network Wizard:\" --msgbox \"No networks detected\" 0 0 " > /tmp/net-setup_scanwindow
  28.       if [ "$1" = "retry" ] ; then # we're on the second try already
  29.         createNoNetworksDialog
  30.       elif [ -n "$IsPCMCIA" ] ; then
  31.         createRetryPCMCIAScanDialog
  32.       else
  33.         createRetryScanDialog
  34.       fi
  35.     fi
  36.     echo "X"
  37.   )  | gtkdialog3 --program=NETWIZ_Scan_Progress_Dialog >/dev/null
  38.     # clean up
  39.     clean_up_gtkdialog NETWIZ_Scan_Progress_Dialog
  40.    
  41. } #end of buildPrismScanWindow
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement