English 中文(简体)
Linux 自动发射应用程序
原标题:autolaunch of application in linux

i have linux os on my leopard target board with tms320dm368 processor. its a raw board with only kernel and rfs. there is no linux distribution (ubuntu,fedora,red hat etc) on the target board. I created the script file as following

#!/bin/sh
echo "my application is here"
./helloworld  # helloworld is our application
  1. after creating the script file i copied it in init.d
  2. I gave the command chmod +x /etc/init.d/vcc_app (vcc_app is the name of script which I have created)
  3. Then I gave the command ln -s /etc/init.d/vcc_app /etc/rc.d/vcc_app (rc.d is the run level directory)

但当我重开董事会时 我的申请书不是自动执行的 有人能帮我吗?

问题回答

您应该将脚本放在 / etc/rcX.d/ vcc_app 中, 在您想要执行的英寸级别上更改 X, 如果您想要在英寸 5 上运行, 那么脚本应该放在 :

/etc/rc5.d/vcc_app

欲了解更多Init 级别信息, < a href="http://www.krishnababug.com/2009/04/what-are-init-0-init-1-init-2-init-3.html" rel=“nofollow”请检查此链接

Also in some distribution you can add a command to launch your script at /etc/rc.local or /etc/rc.d/rc.local, check which files exists and add the command.

了解你董事会上的实际内容将非常令人感兴趣,你声称自己没有分配,但你却使用某种(/etc/init.d),而这种(/etc/init.d)只能用于某种阻力。

所以假设你真的不使用分配, 这意味着你没有外壳, 你没有内置系统。

如果您只需要运行一个应用程序, 就不需要任何 shell 或类似的应用程序 - 只需静态地将您的应用程序连接起来, 并将其作为 /sbin/ init, /etc/ init, /bin/ init 。 见 < href=" http://lxr. linux.no/#linux+v3.4/ init/main.c% 20% 20main. c% 3ainit_ post% 28% 29" rel= “ noforpol” >linux 内核元. c init_ post () 。

Otherwise if you have more than one application, you need an init system. An easy one is uxlaunch, other options include systemd or busybox init. Even with busybox init, you still don t necessarily need a shell on your system.

市场中有几个装置在无壳的情况下运行Linux,包括许多电视机。





相关问题
Signed executables under Linux

For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...

encoding of file shell script

How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How can I use exit codes to run shell scripts sequentially?

Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...

热门标签