Advertisement
s243a

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

Oct 2nd, 2016
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.50 KB | None | 0 0
  1. #This function (line# 991 of wag-profile.sh) is called from loadProfileData (ln# 1036 of the same file. i.e.
  2. # /usr/sbin/wag-profiles.sh
  3. # http://www.pearltrees.com/s243a/assignprofiledata-puppylinux/id16403154
  4. #
  5. # this is code from loadPrifileData, moved here so can be used at boot...
  6. # (rather daft all this, should change profiles to contain PROFILE_ names)
  7. assignProfileData(){
  8.     # now assign to PROFILE_ names...
  9.     PROFILE_WPA_DRV="$WPA_DRV"
  10.     PROFILE_WPA_TYPE="$WPA_TYPE"
  11.     PROFILE_WPA_AP_SCAN="$WPA_AP_SCAN"
  12.     PROFILE_ESSID="$ESSID"
  13.     PROFILE_NWID="$NWID"
  14.     PROFILE_KEY="$KEY"
  15.     PROFILE_MODE="$MODE"
  16.     PROFILE_SECURE="$SECURE"
  17.     PROFILE_FREQ="$FREQ"
  18.     PROFILE_CHANNEL="$CHANNEL"
  19.     PROFILE_AP_MAC="$AP_MAC"
  20.     [ "$PROFILE_ESSID" = "<hidden>" ] && PROFILE_ESSID=""
  21.     if [ "$PROFILE_KEY" = "" ] ; then
  22.         PROFILE_ENCRYPTION="Open"
  23.         ENABLE_WEP_BUTTON='false'
  24.         ENABLE_WPA_BUTTON='false'
  25.         ENABLE_WPA2_BUTTON='false'
  26.         ENABLE_OPEN_BUTTON='true'
  27.     elif [ "$PROFILE_WPA_DRV" = "" ] ; then
  28.         PROFILE_ENCRYPTION="WEP"
  29.         ENABLE_WEP_BUTTON='true'
  30.         ENABLE_WPA_BUTTON='false'
  31.         ENABLE_WPA2_BUTTON='false'
  32.         ENABLE_OPEN_BUTTON='false'
  33.     elif [ "$PROFILE_WPA_TYPE" ] ; then # Dougal: add WPA2
  34.         PROFILE_ENCRYPTION="WPA2"
  35.         ENABLE_WEP_BUTTON='false'
  36.         ENABLE_WPA_BUTTON='false'
  37.         ENABLE_WPA2_BUTTON='true'
  38.         ENABLE_OPEN_BUTTON='false'
  39.     else
  40.         PROFILE_ENCRYPTION="WPA"
  41.         ENABLE_WEP_BUTTON='false'
  42.         ENABLE_WPA_BUTTON='true'
  43.         ENABLE_WPA2_BUTTON='false'
  44.         ENABLE_OPEN_BUTTON='false'
  45.     fi
  46. } # end assignProfileData
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement