[G2 and Desire Z General] vash1053:
I just installed BusyBox (found in the market to anyone who doesn't know) to where it wants to go by default (/system/xbin) and then edited my wifi.sh to be:

For anyone who is new and having troubles, here are my tips:

-Downloading "Terminal Emulator" from the Market can be useful-- I suggest you do so!

-Download "Any Cut" off of the Market. Start the app, select "Activities", and then scroll down to where it lists a bunch of unspecified "Settings". The 6th unnamed setting is the one that links to the wifi hotspot settings. Select it, and it'll make a shortcut on your home screen to it. Open the shortcut, enable wifi hotspot and then click the button below it to setup an SSID and such. I left this on while I performed the rest of the following actions.

*********Note: If you don't want to make a shortcut, you can just run the following script from the Terminal Emulator after you have su access:

-Download VISIONary from the market and run it. It doesn't really give any indication that the root was successful; it just brings you back to your app menu or home screen when it is finished. If in doubt, you can try again... If you're already rooted, it will let you know and then exit.

-I'm not sure if it's necessary for everyone, but downloading BusyBox from the Market and installing it in it's default directory was essential for me. You have to download the app, let it install, then open it up and hit the "install" button.

-Download a program on your PC called TextPad. Open it up, copy and paste the contents of dnsmasq.conf into it. Then "Save as", and do the following: Type in "dnsmasq.conf" as the file name, "save as type" should be "all files", File Format should be set to UNIX (important), and encoding can be left to ANSI. Save it to an easily accessible place, and then do the same process for wifi.sh, EXCEPT use the wifi.sh I have quoted earlier in this post-- not the one at the beginning of the thread.

-You need to use ADB to "push" the files we just made from your computer to the phone, which is a completely different topic entirely. However, if you have ADB but can't get the drivers to work, htt.p://xdaforums.com/showthread.php?t=802316 (remove the . from between the t and the p in "http"; I'm new so I'm not allowed to post links, I guess)

-Use ADB to push the files (adb push *drag file from wherever it is into the CMD box* /data/local/tmp)

-Type in "adb shell" (without the quotes, obviously). The line-start indicator should have changed to a $ . Type in "su", and then quickly check your phone and make sure the "remember" box is checked and then hit accept. The line starting indicator should change to a #.

-Type in "sh /data/local/tmp/wifi.sh"

If no errors are presented, you can now use the phone as a hotspot. If you reboot, reroot the phone, and then open up the "terminal emulator" app I suggested that you download and type in "su" again to get super user access, then "sh /data/local/tmp/wifi.sh" again.

That said, the much easier method to getting the same results in a prettier package would just be to use VISIONary and then install htt.p://android-wifi-tether.googlecode.com/files/wireless_tether_2_0_5-pre10.apk (remove the period again in the http). Use ADB to install it directly onto your phone.

Thanks to everyone who posted the various bits of useful info in this thread and helped me piece this all together. I don't take any credit for any of the scripts that I posted here.