Note:working with user root.
1. 创建自启动脚本test.sh,一般放置到/etc/init.d/目录(optional)
#!bin/sh
xxxxxxxxxxxxxxx
2. 确定系统的启动level.
cat /etc/inittab
See the output line “id:?:initdefaut”, the value of the ? is the value for your system
3.链接启动脚本到启动序列目录
cd /etc/rc.d/rc?.d/
ln -s ../init.d/test.sh S##test
Where ## must be replaced by a number that is notcurrently in use by another symbolic link in the folder