This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I have added some tools to my custom build of Gingerbread 2.3.4 for the BeagleBoard. Specifically, I have gotten the linux wireless 'iw' tool installed. I would like to run a command with iw and ifconfig from my init.rc, and have tried the obvious things without any luck.
The commands I want to run in sequence are:
iw phy phy0 interface add mesh0 type mp mesh_id mymesh
ifconfig mesh0 192.168.80.4
These commands work perfectly from the serial console (I have a beagleboard XM). The 2 things I have tried are in the init.rc file, to type the 2 commands as shown above, before the section where all the services are defined. That didn't work. The second thing I tried was to start 2 services as shown below.
# Try to automate mesh creationservice meshcreate /system/bin/iw phy phy0 interface add mesh0 type mp mesh_id mymesh user meshcreate group meshcreate oneshotservice assignmeship /system/bin/ifconfig mesh0 192.168.80.4 user assignmeship group assignmeship oneshot
The ifconfig program comes standard with the sourcecode released by TI, and IW is something that I installed.
Thanks in advance.
Please try with the following.
Create a script somewhere for example, /system/bin/mymod.rc
Add the following in /init.rc: service myscript /system/bin/mymod.rc oneshot
mark this post
as answered via the Verify
button below if you think it answers your question. Thanks!
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Pankaj Bharadiya:
Thanks for responding so quickly. I tried your suggestion. At the end of my init.rc file, I had the following:
# automate mesh creationservice myscript /system/bin/mymod.rc oneshot
In /system/bin, I have a file called mymod.rc, which contains the following code:
#!/system/bin/shiw phy phy0 interface add mesh0 type mp mesh_id mymeshifconfig mesh0 192.168.80.4
After the beagleboard starts up, I tried the command 'ifconfig mesh0', and I got a response saying that the interface didn't exist. Do you have any other ideas as to why this wouldn't work?
In reply to Kiran Karra:
Sorry I jumped the gun. I also had to change the permissions of the mymod.rc file to 755, user to root, and group to 2000, and it worked.
Thanks for the help,
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.