Community
cancel
Showing results for 
Search instead for 
Did you mean: 
jwei9
Beginner
1,135 Views

"iwconfig wlan0" not executing at startup

Jump to solution

I'm totally new to Linux

 

 

How do I run a command on startup ?

 

I'm running a startup .sh script to get the network parameters(Signal level,Bit Rate, Link Quality) on my Intel Edison to save it into a text file(test.txt).

 

And there's no rc.local for Yocto, where should I put this .sh file to make it run on startup?

 

My code in the .sh file is looks like this:

# !/bin/sh

 

iwconfig wlan0 | grep -E -o ".{0,1}-.{0,6} |.{0,4}Mb/s.{0,3}|.{0,3}/70.{0,0}"

 

 

0 Kudos
1 Solution
Carlos_M_Intel
Employee
81 Views

Hi,

I would like to know if you have been able to run your script on startup.

The Edison image uses systemd for manage the different services. You need to call your command at the ExecStart section. The service will need the structure of [Unit],[Service] and [Install].

There are some threads that may help you with this:

Take a look at this document where Peter gives an example for a specific code:

Remember to start it and enable it the service in order to run it every time at boot.

Regards,

Charlie

View solution in original post

1 Reply
Carlos_M_Intel
Employee
82 Views

Hi,

I would like to know if you have been able to run your script on startup.

The Edison image uses systemd for manage the different services. You need to call your command at the ExecStart section. The service will need the structure of [Unit],[Service] and [Install].

There are some threads that may help you with this:

Take a look at this document where Peter gives an example for a specific code:

Remember to start it and enable it the service in order to run it every time at boot.

Regards,

Charlie

View solution in original post

Reply