[c5c522c] | 1 | #!/bin/sh |
---|
| 2 | # |
---|
| 3 | # rc.inet2 This shell script boots up the entire network system. |
---|
| 4 | # Note, that when this script is used to also fire |
---|
| 5 | # up any important remote NFS disks (like the /usr |
---|
| 6 | # directory), care must be taken to actually |
---|
| 7 | # have all the needed binaries online _now_ ... |
---|
| 8 | # |
---|
| 9 | # Uncomment or comment out sections depending on which |
---|
| 10 | # services your site requires. |
---|
| 11 | # |
---|
| 12 | # Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> |
---|
| 13 | # Modified for Slackware by Patrick Volkerding <volkerdi@slackware.com> |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | # At this point, we are ready to talk to The World... |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | # Mount remote (NFS) filesystems: |
---|
| 20 | if cat /etc/fstab | grep -v '^#' | grep -w nfs 1> /dev/null 2> /dev/null ; then |
---|
| 21 | # Start rpc.portmap, /sbin/rpc.lockd, and /sbin/rpc.statd if we find NFS |
---|
| 22 | # volumes defined in /etc/fstab since these will need to be running in order |
---|
| 23 | # to mount them. If they are not running, attempting to mount an NFS |
---|
| 24 | # partition will cause mount to hang, or at least result in unreliable |
---|
| 25 | # operation. Keep this in mind if you plan to mount unlisted NFS |
---|
| 26 | # partitions... |
---|
| 27 | # If you have uncommented NFS partitions in your /etc/fstab, rc.rpc is run |
---|
| 28 | # whether it is set as executable or not. If you don't want to run it, |
---|
| 29 | # comment the NFS partitions out in /etc/fstab or erase/rename rc.rpc. |
---|
| 30 | if [ -r /etc/rc.d/rc.rpc ]; then |
---|
| 31 | sh /etc/rc.d/rc.rpc start |
---|
| 32 | fi |
---|
| 33 | echo "Mounting remote (NFS) file systems: /sbin/mount -a -t nfs" |
---|
| 34 | /sbin/mount -a -t nfs # This may be our /usr runtime! |
---|
| 35 | # Show the mounted volumes: |
---|
| 36 | /sbin/mount -v -t nfs |
---|
| 37 | fi |
---|
| 38 | |
---|
| 39 | # If /etc/rc.d/rc.rpc is executable, run it to load rpc.portmap, rpc.lockd, |
---|
| 40 | # and rpc.statd. This might be needed to mount NFS partitions that are not |
---|
| 41 | # listed in /etc/fstab. Starting this twice won't hurt as the script will |
---|
| 42 | # check if things are already running before trying to start them. |
---|
| 43 | if [ -x /etc/rc.d/rc.rpc ]; then |
---|
| 44 | sh /etc/rc.d/rc.rpc start |
---|
| 45 | fi |
---|
| 46 | |
---|
| 47 | # Mount remote CIFS filesystems. Note that where possible, using CIFS is |
---|
| 48 | # preferred over SMBFS. SMBFS is no longer actively maintained. |
---|
| 49 | if cat /etc/fstab | grep -v '^#' | grep -w cifs 1> /dev/null 2> /dev/null ; then |
---|
| 50 | echo "Mounting remote CIFS file systems: /sbin/mount -a -t cifs" |
---|
| 51 | /sbin/mount -a -t cifs |
---|
| 52 | # Show the mounted volumes: |
---|
| 53 | /sbin/mount -v -t cifs |
---|
| 54 | fi |
---|
| 55 | |
---|
| 56 | # Mount remote SMB filesystems: |
---|
| 57 | if cat /etc/fstab | grep -v '^#' | grep -w smbfs 1> /dev/null 2> /dev/null ; then |
---|
| 58 | echo "Mounting remote SMBFS file systems: /sbin/mount -a -t smbfs" |
---|
| 59 | /sbin/mount -a -t smbfs |
---|
| 60 | # Show the mounted volumes: |
---|
| 61 | /sbin/mount -v -t smbfs |
---|
| 62 | fi |
---|
| 63 | |
---|
| 64 | # Start the system logger if it is not already running (maybe because /usr |
---|
| 65 | # is on a network partition). |
---|
| 66 | if [ -x /etc/rc.d/rc.syslog -a -d /var/log -a ! -r /var/run/syslogd.pid ]; then |
---|
| 67 | . /etc/rc.d/rc.syslog start |
---|
| 68 | fi |
---|
| 69 | |
---|
| 70 | # Start the inetd server: |
---|
| 71 | #if [ -x /etc/rc.d/rc.inetd ]; then |
---|
| 72 | # /etc/rc.d/rc.inetd start |
---|
| 73 | #fi |
---|
| 74 | |
---|
| 75 | # Start the OpenSSH SSH daemon: |
---|
| 76 | if [ -x /etc/rc.d/rc.sshd ]; then |
---|
| 77 | echo "Starting OpenSSH SSH daemon: /usr/sbin/sshd" |
---|
| 78 | /etc/rc.d/rc.sshd start |
---|
| 79 | fi |
---|
| 80 | |
---|
| 81 | # Start the BIND name server daemon: |
---|
| 82 | #if [ -x /etc/rc.d/rc.bind ]; then |
---|
| 83 | # /etc/rc.d/rc.bind start |
---|
| 84 | #fi |
---|
| 85 | |
---|
| 86 | # Start NIS (the Network Information Service): |
---|
| 87 | #if [ -x /etc/rc.d/rc.yp ]; then |
---|
| 88 | # . /etc/rc.d/rc.yp start |
---|
| 89 | #fi |
---|
| 90 | |
---|
| 91 | # Start the NFS server. Note that for this to work correctly, you'll |
---|
| 92 | # need nfsd support in the kernel (the startup script will try to load |
---|
| 93 | # the module for you). |
---|
| 94 | # You'll also need to set up some shares in /etc/exports. |
---|
| 95 | # Starting the NFS server: |
---|
| 96 | if [ -x /etc/rc.d/rc.nfsd ]; then |
---|
| 97 | /etc/rc.d/rc.nfsd start |
---|
| 98 | fi |
---|
| 99 | |
---|