wirelesswizard 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. #!/bin/sh
  2. #2007 Lesser GPL licence v2 (http://www.fsf.org/licensing/licenses/lgpl.html)
  3. #wizard to setup wireless
  4. BUTTONS="Setup_ndiswrapper:10,Run_WAG:11,EXIT:19"
  5. if [ "`which perl`" ];then
  6. MSG01="GOOD: It seems that Perl is available, and Perl is needed to install the
  7. Windows driver for the wireless card. You now have three choices:
  8. CHOICE 1: ndiswrapper
  9. Note that Perl is only required during installation of the driver.
  10. Okay, that is one requirement out of two! Now, do you have the CD that came with
  11. the wireless card? If so, click the \"Setup_ndiswrapper\" button...
  12. CHOICE 2: wifi-beta.pup
  13. If you do not have the XP driver for the card, Bladehunter (Forum name) has
  14. developed wifi-beta.pup, a DotPup package that enables you to use ndiswrapper
  15. without requiring Perl. But, it only works for certain wifi cards. Find out more
  16. and to download, go to the Announcements section of the Puppy Forum. Download
  17. it, install it (it is a DotPup package, so after downloading it, you just click
  18. on it to install it), then run this Wizard again.
  19. Please click \"EXIT\" button if wifi-beta.pup not installed...
  20. Please click \"Run_WAG\" button if wifi-beta.pup is installed...
  21. CHOICE 3: Use a Linux driver
  22. Many wifi cards have a Linux driver module and some are installed in Puppy, and
  23. more can be found if you go to the Announcements section of the Puppy Forum.
  24. Quit this Wizard, install a driver, load it with modprobe, then run this Wizard.
  25. Please click \"EXIT\" button only..."
  26. else
  27. MSG01="BAD: ndiswrapper needs Perl to install the Windows card driver,
  28. and Perl is not installed in Puppy. You now have three choices:
  29. CHOICE 1: Install Perl via usr_devx.sfs
  30. Click the \"EXIT\" button to quit this script. You must install Perl first, before
  31. running this Wizard. It is easy to do: just download usr_devx.sfs, that you will
  32. find via the Puppy download page (one day I will get this script to do it!),
  33. download it to /mnt/home (unless /mnt/home is a NTFS partition, then you have to
  34. boot Windows and download it to C: drive). Or, if you have a full hard drive
  35. installation of Puppy (Option-2) then place usr_devx.sfs at /. After downloading
  36. usr_devx.sfs, reboot Puppy, then run this Wireless Wizard again.
  37. Note 1: Perl is only required during installation of the card driver.
  38. Note 2: usr_devx.sfs is 43M so if on dialup you may want CHOICE 1b, 2 or 3.
  39. Please click \"EXIT\" button only...
  40. CHOICE 1b: Install Perl via PupGet
  41. As above, but there is a Perl PupGet package, that is only a 924K download.
  42. Choose this if on dialup, or not interested in the compiling tools provided by
  43. usr_devx.sfs. After installing the wireless driver, Perl may be uninstalled.
  44. Please click \"EXIT\" button only...
  45. CHOICE 2: Install wifi-beta.pup
  46. This is a package developed by Bladehunter (Forum name) that enables you to use
  47. ndiswrapper without requiring Perl at all. This works for certain wireless cards
  48. only -- go to the Announcements section of the Puppy Forum for more information
  49. and a download link. Download it, install it (it is a DotPup package, so after
  50. downloading it, you just click on it to install it), then run this Wizard again.
  51. Please click \"EXIT\" button if wifi-beta.pup not installed...
  52. Click \"Run_WAG\" button if wifi-beta.pup installed...
  53. CHOICE 3: Use a Linux driver
  54. Many wifi cards have a Linux driver module and some are installed in Puppy, and
  55. more can be found if you go to the Announcements section of the Puppy Forum.
  56. Quit this Wizard, install a driver, load it with modprobe, then run this Wizard
  57. and click on \"Run_WAG\" button.
  58. Please click \"EXIT\" button only..."
  59. fi
  60. if [ "`iwconfig | grep "Signal level"`" = "" ];then
  61. #BUTTONS="Setup_ndiswrapper:10,EXIT:19"
  62. MSG11="$MSG01"
  63. else
  64. #BUTTONS="Run_WAG:11,EXIT:19"
  65. MSG11="VERY GOOD:
  66. It seems that you already have a working wireless interface, so go ahead and
  67. click on the \"Run_WAG\" button to establish connectivity with a wireless
  68. network. WAG is an acronym for Wireless Access Gadget and is a brilliant
  69. program developed by keenerd (Forum name).
  70. Click the \"Run_WAG\" button now..."
  71. fi
  72. xmessage -bg "light yellow" -center -name "wirelesswizard" -title "wirelesswizard: Welcome" -buttons "$BUTTONS" "Welcome to the Puppy Wireless Networking Wizard!
  73. NOTE: if you have a physical Ethernet cable plugged into your PC, this is the
  74. wrong Wizard! Click \"EXIT\" button, and run the Ethernet Wizard....
  75. $MSG11
  76. "
  77. case ${?} in
  78. 10)
  79. echo "ndiswrapper"
  80. ;;
  81. 11)
  82. exec /usr/sbin/wag
  83. ;;
  84. *)
  85. exit
  86. ;;
  87. esac
  88. #ndiswrapper setup...
  89. xmessage -bg "light yellow" -center -name "wirelesswizard" -title "wirelesswizard: Ndiswrapper" -buttons "Run_WAG:10,EXIT:19" "Early days with this Wizard. For now the ndiswrapper setup is manual.
  90. Follow these instructions, write them down if necessary.
  91. If the ndiswrapper does not work, which is possible, you will need to find
  92. a specific Linux driver for your wireless card. Look on the Forum and Wiki
  93. for further information on that.
  94. Here are the steps:
  95. 1. Mount the CD supplied with the wireless card.
  96. 2. Open a terminal in the XP drivers folder on the CD. Then type these:
  97. 3. # ndiswrapper -i drivername.inf ...this creates /etc/ndiswrapper/
  98. (substitute the actual .inf filename for drivername.inf)
  99. 4. # ndiswrapper -l ...this tests status of installed driver.
  100. (that is the letter l, not the numerical 1)
  101. 5. # modprobe ndiswrapper ...this loads the module
  102. 6. # iwconfig ...tests if interface available
  103. After Step 6, if it does look like you have a functioning wireless interface,
  104. go ahead and click the \"Run_WAG\" button...
  105. If one of the steps failed, click \"EXIT\" button..."
  106. case ${?} in
  107. 10)
  108. exec /usr/sbin/wag
  109. ;;
  110. *)
  111. exit
  112. ;;
  113. esac
  114. ###END###