inetd.sh

来自「samba-3.0.22.tar.gz 编译smb服务器的源码」· Shell 代码 · 共 38 行

SH
38
字号
#! /bin/sh## kill any running samba processes#/etc/killall smbd nmbdchkconfig samba off## add SAMBA deamons to inetd.conf#cp /etc/inetd.conf /etc/inetd.conf.Oif [ $? -ne 0 ]; then exit 1; fiif [ ! -r /etc/inetd.conf.O -o ! -w /etc/inetd.conf ]; then exit 1; fised -e "/^netbios/D" -e "/^#SAMBA/D" /etc/inetd.conf.O > /etc/inetd.confecho '#SAMBA services' >> /etc/inetd.confecho netbios-ssn stream tcp  nowait  root    /usr/samba/bin/smbd smbd  >> /etc/inetd.confecho netbios-ns  dgram udp   wait    root    /usr/samba/bin/nmbd nmbd -S >> /etc/inetd.conf## add SAMBA service ports to /etc/services#cp /etc/services /etc/services.Oif [ $? -ne 0 ]; then exit 1; fiif [ ! -r /etc/services.O -o ! -w /etc/services ]; then exit 1; fised -e "/^netbios/D" -e "/^#SAMBA/D" /etc/services.O > /etc/servicesecho '#SAMBA services' >> /etc/servicesecho 'netbios-ns	137/udp				# SAMBA' >> /etc/servicesecho 'netbios-ssn	139/tcp				# SAMBA' >> /etc/services## restart inetd to start SAMBA#/etc/killall -HUP inetd

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?