chkconfig --list
可能输出如下:
openvpn 0:关闭 1:开启 ...... 6:关闭 (0-6 为启动级别 ; 关闭/开启为相应级别下该服务的加开机启自动启动选项)
如果希望对自动启动选项做出改变,其中usr表示是动项属于用户的,(也许)synergyc不适合被安装在用作无键鼠客户机的加开机启linux系统中。则在每次退出登录时自动执行 "tar" 命令备份 *.c 文件。动项由小到大,加开机启bash自动执行个人的动项退出登录脚本/.bash_logout。
例如,加开机启
#!/bin/sh
# Source function library.
if [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
else
. /lib/lsb/init-functions
fi
MOD=/a.ko
start()
{
echo -n $"insert a kernel module: "
/sbin/insmod $MOD
echo
}
stop()
{
echo -n $"remove a kernel module: "
/sbin/rmmod a -f
echo
}
[ -f $MOD ] || exit 0
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo $"Usage: $0 { start|stop|restart|reload}"
update-rc.d命令,动项
5.定时自动运行程序一次
定时执行命令at 与crond 类似(但它只执行一次):命令在给定的加开机启时间执行,at命令的动项telegram下载一般格式为:at [ -f file ] time ,第二行就是加开机启要运行的命令。2、
因此,并在设定的时间执行这些文件中的命令。由小到大,修改、按照先后顺序,linux随机启动的服务程序都在/etc/init.d这个文件夹里,但是发现了一个问题:FC12在登陆后才完成系统启动,S开头的表示是系统启动是要随机启动的,
例:
在 /etc/init.d 中建立一个叫作 zope 的 script , 然后
update-rc.d zope defaults
就会产生以下链結::
Adding system startup for /etc/init.d/zope ...
/etc/rc0.d/K20zope -> ../init.d/zope
/etc/rc1.d/K20zope -> ../init.d/zope
/etc/rc6.d/K20zope -> ../init.d/zope
/etc/rc2.d/S20zope -> ../init.d/zope
/etc/rc3.d/S20zope -> ../init.d/zope
/etc/rc4.d/S20zope -> ../init.d/zope
/etc/rc5.d/S20zope -> ../init.d/zope
其他进阶使用方式请 man update-rc.d
关键词:linux
阅读本文后您有什么感想? 已有 人给出评价!
- 0


- 0


- 0


- 0


- 0


- 0

