#!/bin/sh # # rc.inet2 This shell script starts daemons and mounts network filesystems # Author: Fred N. van Kempen, # Modified for Slackware by Patrick Volkerding # Modified by Jean-Philippe Guillemin for Zenwalk Linux :) . /etc/shell-colors # At this point, we are ready to talk to The World... # Mount remote (NFS) filesystems if cat /etc/fstab | grep -v '^#' | grep -w nfs 1> /dev/null 2> /dev/null ; then # We need the portmapper if ps axc | grep -q rpc.statd ; then sbin/mount -a -t nfs # Show the mounted volumes /sbin/mount -v -t nfs else echo "Please activate the portmapper (rc.rpc), NFS needs it!" fi fi # Mount remote (SMB) filesystems: if cat /etc/fstab | grep -v '^#' | grep -w smbfs 1> /dev/null 2> /dev/null ; then /sbin/mount -a -t smbfs # Show the mounted volumes: /sbin/mount -v -t smbfs fi ############## STARTING DAEMONS AND NETWORK SERVICES ################## # We won't start these services from here, don't play with this list ;) blacklist(){ for mask in \~ .new rc.S rc.M rc.K rc.4 rc.0 rc.6 .conf rc.services rc.inet1 rc.inet2 rc.postinstall rc.rpc \ rc.modules rc.local rc.keymap rc.sample rc.font rc.serial rc.udev rc.uwd rc.acpid rc.howl rc.wireless \ rc.alsa rc.numlock rc.syslog rc.font rc.cups rc.famd rc.gpm rc.messagebus rc.licences \ rc.avahidaemon ; do echo $1 | grep $mask done } # Here we go for rcscript in /etc/rc.d/rc.* ; do [ "$(blacklist $rcscript)" ] && continue if [ -x $rcscript ]; then service="$(basename $rcscript | sed -e 's/^rc\.\(.*\)$/\1/')" $rcscript start & fi done # All done.