Creating /etc/init.d/local
sudo vi /etc/init.d/local
This file is a shell script and it should start with:
#!/bin/sh
Making the file executable
Make this file executable with:
sudo chmod +x /etc/init.d/local
link the new local file with Init
We are going to use this script a System V init script using:
sudo update-rc.d local defaults 80
An Example
Now you can call your scripts or pograms using this file. For example, to mount a NFS directry at boot time add the following line to /etc/init.d/rc.local
mount server.fossedu.org:/data /data
ubuntu 11.04启动文件
猜你喜欢
转载自jrails.iteye.com/blog/1066713
今日推荐
周排行