Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to set my wireless card to adhoc mode after the system starts. I have created a shell script following this guide:

https://help.ubuntu.com/community/WifiDocs/Adhoc#Wireless_Extensions_CLI_tools_Method

If I execute the script manually, everything works fine. However if I add it to the init.d as described here:

https://help.ubuntu.com/community/UbuntuBootupHowto#Installing_custom_init-scripts

or if I set it as a cron job triggered at "@reboot", the wireless interface doesn't seem to start.

I'm guessing that I can configure the card to start directly into the adhoc mode with /etc/network but I don't really know how.

Can anybody point me in the right direction?

share|improve this question

1 Answer 1

From here you add wireless-mode ad-hoc to your interface definition

auto wlan0
iface wlan0 inet static
    address 192.168.1.1
    netmask 255.255.255.0
    wireless-channel 1
    wireless-essid MYNETWORK
    wireless-mode ad-hoc
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.