您的位置:首页 > 文档 > samba >
 文章分类 

开机自动启动samba


创建:2005-10-27 16:19:06
作者:Unlinux
来自: http://www.Unlinux.com

最标准的做法
1. 在 /etc/init.d 中作一个如下内容的脚本smbd

$smbspool=/var/spool/samba
$piddir=/var/run
$smbd=/usr/sbin/smbd
$nmbd=/usr/sbin/nmbd
if [ "x$1" = "x" -o "x$1" = "xstart" ]; then
 if [ -d $smbspool ]; then
  rm -f $smbspool/*
 fi
 $smbd -D
 $nmbd -D
elif [ "x$1" = "xstop" ]; then
 kill `cat $piddir/smbd.pid`
 kill `cat $piddir/nmbd.pid`
else
 echo "$0 start|stop"
fi
2. 然后执行
ln -s /etc/init.d/smbd /etc/rc3.d/S99smbd
ln -s /etc/init.d/smbd /etc/rc0.d/K01smbd

转载自:http://www.unlinux.com/doc/samba/20051027/3668.html

评论】 【加入收藏夹】 【 】 【打印】 【关闭
 *  请尊重我们的劳动,转载请注明出自UnLinux.Com及作者名 * 

※ 相关链接
 ·开机/关机管理  (2005-10-26 13:56:22)
 ·开机和关机  (2005-10-26 13:56:22)
 ·开机简述  (2005-10-26 13:56:22)
 ·RedHat开机起动流程  (2005-10-26 13:56:19)
 ·RedHat 开机起动流程  (2005-10-26 13:56:19)
 ·RedHat 开机起动流程  (2005-10-26 13:56:19)
 ·RedHat开机起动流程  (2005-10-26 13:56:19)
 ·linux各项系统开机服务的功能是什么?  (2005-10-26 13:56:18)
 ·Linux开机过程的分析(关于bootsect.S)  (2005-10-26 13:56:18)
 ·Linux下Grub开机管理程式安装简介  (2005-10-26 13:56:16)

Copyright © 2005 UnLinux.Com All Rights Reserved