|

楼主 |
发表于 2003-11-17 20:08:13
|
显示全部楼层
#!/bin/sh
#
# rc.M This file is executed by init(8) when the system is being
# initialized for one of the "multi user" run levels (i.e.
# levels 1 through 6). It usually does mounting of file
# systems et al.
#
# Version: @(#)/etc/rc.d/rc.M 2.02 02/26/93
#
# Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
# Heavily modified by Patrick Volkerding <volkerdi@ftp.cdrom.com>
#
# Adapted for BsV by Jonathan B. Araujo Neto <jones@brfree.com.br>
#
# Tell the viewers what's going to happen...
echoc "==> rc.M Entering multiuser mode...." blue
sleep 2
# Configure ISA plug'n'pray
if [ -x /etc/rc.d/rc.pnp ] ; then
echoc "Configuring ISA Plug and Pray" red
. /etc/rc.d/rc.pnp
fi
# This loads any kernel modules that are needed. These might be required to
if [ -x /etc/rc.d/rc.modules ]; then
echoc "Loading modules" red
. /etc/rc.d/rc.modules
fi
# Initialize PCMCIA devices:
if [ -x /etc/rc.d/rc.pcmcia ] ; then
echoc "Setting up PCMCIA" red
. /etc/rc.d/rc.pcmcia start
fi
# Initialize USB hotplugging:
if [ -x /etc/rc.d/rc.hotplug ]; then
echoc "Starting USB hotplug service..." red
sleep 2
. /etc/rc.d/rc.hotplug start
fi
# Run serial port setup script:
# (CAREFUL! This can make some systems hang if the rc.serial script isn't
# set up correctly. If this happens, you may have to edit the file from a
# boot disk)
#
if [ -x /etc/rc.d/rc.serial ] ; then
echoc "Setting up serial devices" red
. /etc/rc.d/rc.serial
fi
# Initialize the NET subsystem.
if [ -x /etc/rc.d/rc.inet1 ] ; then
echoc "Setting up net subsystem" red
. /etc/rc.d/rc.inet1
fi
if [ -x /etc/rc.d/rc.inet2 ]; then
echoc "Setting up internal network........" red
. /etc/rc.d/rc.inet2
fi
# Check quotas and then turn quota system on:
if [ -x /etc/rc.d/rc.quota ] ; then
echoc "Setting up quota" red
. /etc/rc.d/rc.quota
fi
# Check for a cdrom and mount it
if [ -x /etc/rc.d/rc.cdrom ] ; then
echoc "Setting up CDROM" red
. /etc/rc.d/rc.cdrom
fi
# Load a custom keymap and console font.
if [ -x /etc/rc.d/rc.keymap ] ; then
echoc "Setting up characters devices: keyboard" red
. /etc/rc.d/rc.keymap
fi
############添加这一项##########
echoc "starting samba..." red
. /etc/rc.d/rc.samba
##############################
# Start the Cups printer daemon for printing
if [ -x /etc/rc.d/rc.printer ]; then
echoc "Starting the printer driver..." red
. /etc/rc.d/rc.printer
fi
# Start the local setup procedure.
if [ -x /etc/rc.d/rc.local ] ; then
echoc "Starting local setup" red
. /etc/rc.d/rc.local
fi
# All done.
rc.M添加rc.samba后开机可以启动samba,命令 smbstatus显示:
Samba version 2.2.8a
Service uid gid pid machine
----------------------------------------------
No locked files
命令lpinfo -v还是没有显示smb一项。
命令:
lpadmin -p printer -v smb://server:server@printserver/hp6 -m laserjet.ppd -E
显示:
lpadmin: add-printer (set device) failed: client-error-not-possible
不知道什么原因。我在debian下没有这些问题。按照上述命令可以很容易地使用局域网的windows打印机。 |
|