|
|
发表于 2006-6-1 09:37:40
|
显示全部楼层
加在boot.local里肯定有问题,因为那时network脚本还没有执行,网卡还没有激活,所以要加在network脚本后
在/etc/init.d/下新建一文件vsftp,内容可以参照下面的格式
#! /bin/sh
#
#
### BEGIN INIT INFO
# Provides: vsftpd
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Start the vsftpd daemon
### END INIT INFO
. /etc/rc.status
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
# rc_status -v ditto but be verbose in local rc status
# rc_status -v -r ditto and clear the local rc status
# rc_failed set local and overall rc status to failed
# rc_reset clear local rc status (overall remains)
# rc_exit exit appropriate to overall rc status
# First reset status of this service
rc_reset
case "$1" in
start)
/usr/sbin/vsftpd /etc/vsftpd-ano.conf
;;
stop)
pkill vsftpd
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
rc_exit
然后root用户执行chkconfig -a vsftp |
|