Init script Problem
Hello Guys;
I need to write some init scripts about serial port in my project . I researched related post in forums but I get some problem about it. I m using embedded linux , so I am using chkconfig for adding scripts to system. Code:
### BEGIN INIT INFO Code:
chkconfig --add init.sh After I restart my development board I check the permission of my serialport like; Code:
ls -la /dev/ttymxc0 My init script doesnt work . Am I missing something? Or Am I doing wrong ? Can you help me about that. Thanks Best Regards |
You are not telling us how your script is actually started. If you run it manually, does it work? <Your_init.sh start>
If that doesn't work, sort the script. If it does work, make duresomething is calling the script. |
Quote:
Yes your are right I checked if it is working and result is not working . What do you think about what is the reason of this ? Because lot s of scripts are written like that |
that is your entire script?
is it bash? where is the shee bang? Code:
#!/bin/bash Code:
#!/bin/bash |
Yes add a shebang, and the script must be executable i.e. x-bit must be set.
(Actually this is a deviation from the Unix SysV init.) |
Quote:
Do you have any suggestion or any idea ? |
You say your script does not work. Does the 'chmod' command in the start section achieve the desired results when you run that from a command line?
|
Just seeing the
Quote:
And maybe in the init.sh there should be Code:
chmod ogu+rw /dev/ttymxc0 |
Quote:
|
ok - if you got that init.sh no got seebang it not going to work no matter how many time you chmod +x on it.
add Code:
#!/bin/bash Yocto Project - is that script part of the Yocto Project? if yes then read specs on Yocto Project and make it conform to Yocto Project specs. |
Quote:
|
Quote:
|
All times are GMT -5. The time now is 02:39 PM. |