From 789a1cbad9a42c095f9de537bdfa02fb17ee8926 Mon Sep 17 00:00:00 2001 From: neilbrown Date: Fri, 3 Dec 2004 03:55:52 +0000 Subject: [PATCH] remove nodist stuff --- etc/nodist/nfs-client | 74 --------------------- etc/nodist/nfs-functions | 104 ------------------------------ etc/nodist/nfs-server | 135 --------------------------------------- 3 files changed, 313 deletions(-) delete mode 100755 etc/nodist/nfs-client delete mode 100755 etc/nodist/nfs-functions delete mode 100755 etc/nodist/nfs-server diff --git a/etc/nodist/nfs-client b/etc/nodist/nfs-client deleted file mode 100755 index d1a0029..0000000 --- a/etc/nodist/nfs-client +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh -# nfs This shell script starts and stops the nfs services in a distribution -# independent fashion. -# -# description: starts and stops nfs client services -# chkconfig: 2345 60 86 -# -# Copyright (c) 2000-2001 Mission Critical Linux, Inc. -# - -PATH=/sbin:/bin:/usr/sbin:/usr/bin -export PATH - -# Who am I? -SCRIPT_NAME=`basename $0` - -# Grab our daemon functions. -. `dirname $0`/nfs-functions - -# Kernel daemons and options -PREFIX="rpc." # Prefix for kernel execs (usually "rpc.") -LOCKD="lockd" # Lockd - -# User daemons and options -STATD="rpc.statd" # NLM Server - -# We use "type -path" instead of "which" since it's internal to bash. -[ -x "`type -path $STATD`" ] || exit 0 -[ -x "`type -path $PREFIX$LOCKD`" ] || exit 0 - -# Handle how we were called. -case "$1" in -start) - # Start rpc.statd daemon without options... - echo -n "Starting $STATD: " - startdaemon $STATD - - echo -n "Starting $LOCKD: " - startdaemon $PREFIX$LOCKD - - # if this lock file doesn't exist, init won't even try to run - # the shutdown script for this service on RedHat systems! - # on non-RedHat systems, /var/lock/subsys may not exist. - touch /var/lock/subsys/$SCRIPT_NAME &> /dev/null - ;; - -stop) - echo -n "Stopping $STATD: " - stopdaemon $STATD - - echo -n "Stopping $LOCKD: " - stopdaemon $LOCKD - - rm -f /var/lock/subsys/$SCRIPT_NAME - ;; - -restart) - $0 stop - $0 start - ;; - -status) - daemonstatus $STATD - daemonstatus $LOCKD - - exit 0 - ;; - -*) - echo "Usage: $0 {start|stop|status|restart}" - exit 1 -esac - -exit 0 diff --git a/etc/nodist/nfs-functions b/etc/nodist/nfs-functions deleted file mode 100755 index 1f7b050..0000000 --- a/etc/nodist/nfs-functions +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/bash -# -# An attempt at a simple, distribution-independent daemon management. -# -# Copyright (C) 2000-2001 Mission Critical Linux, Inc. -# - -# daemon functions -getpid() -{ - pid='' - if [ -f /var/run/${base}.pid ] - then - pid=`head -1 /var/run/${base}.pid` - fi - if [ "$pid" = "" ] - then - pid=`pidof $1` - fi - if [ "$pid" = "" ] - then - pid=`ps ax | awk 'BEGIN { prog=ARGV[1]; ARGC=1 } - { if ((prog == $5) || (("(" prog ")") == $5) || - (("[" prog "]") == $5) || - ((prog ":") == $5)) { print $1 ; exit 0 } }' $1` - fi - - echo $pid -} - -startdaemon() -{ - base=`basename $1` - - # check if it is already running - pid=`getpid $base` - [ -n "$pid" ] && ps h $pid >/dev/null 2>&1 && echo " already running." && return - - # don't dump core - ulimit -c 0 - - $* && echo " done." || echo " failed." -} - -stopdaemon() -{ - base=`basename $1` - pid=`getpid $base` - - if [ "$pid" != "" ] - then - if ps h $pid>/dev/null 2>&1 - then - kill -TERM $pid - if ps h $pid>/dev/null 2>&1 - then - sleep 1 - if ps h $pid>/dev/null 2>&1 - then - sleep 3 - if ps h $pid>/dev/null 2>&1 - then - kill -KILL $pid - sleep 2 - fi - fi - fi - fi - ps h $pid >/dev/null 2>&1 - RC=$? - [ $RC -eq 0 ] && echo " failed." || echo " done." - [ $RC -eq 0 ] || rm -f /var/run/$base.pid >/dev/null 2>&1 - else - echo " not running." - fi -} - -daemonstatus() -{ - base=`basename $1` - pid=`getpid $base` - - if [ "$pid" != "" ] - then - if ps h $pid >/dev/null 2>&1 - then - echo "$base (pid $pid) is running." - return 0 - else - if [ -f /var/run/${base}.pid ] - then - echo "$base dead but pid file exists." - return 1 - else - echo "$base is stopped." - return 2 - fi - fi - else - echo "$base is stopped." - return 3 - fi -} - diff --git a/etc/nodist/nfs-server b/etc/nodist/nfs-server deleted file mode 100755 index f164884..0000000 --- a/etc/nodist/nfs-server +++ /dev/null @@ -1,135 +0,0 @@ -#!/bin/sh -# nfs This shell script starts and stops the nfs services in a distribution -# independent fashion. -# -# description: starts and stops nfs server services -# chkconfig: 2345 60 20 -# -# Copyright (c) 2000-2001 Mission Critical Linux, Inc. -# - -PATH=/sbin:/bin:/usr/sbin:/usr/bin -export PATH - -# Who am I? -SCRIPT_NAME=`basename $0` - -# Grab our daemon functions. -. `dirname $0`/nfs-functions - -# Kernel daemons and options -PREFIX="rpc." # Prefix for kernel execs (usually "rpc.") -NFSD="nfsd" # Kernel NFS Server -RPCNFSDCOUNT="8" # Number of nfsd threads - -# User daemons and options -RQUOTAD="rpc.rquotad" # Remote quota server -MOUNTD="rpc.mountd" # Mount server -RPCMOUNTDOPTS="" # options for rpc.mountd -EXPORTFS="exportfs" # Exportfs command - -SCRIPT_NAME=`basename $0` -DESC="NFS kernel daemon" - -# We use "type -path" instead of "which" since it's internal to bash. -[ -x "`type -path $PREFIX$NFSD`" ] || exit 0 -[ -x "`type -path $MOUNTD`" ] || exit 0 - -# Also make sure we have our exportfs command. -[ -x "`type -path $EXPORTFS`" ] || exit 0 -[ -s /etc/exports ] || exit 0 - -# rquotad is not required for NFS to work, however. -# Unset if it is not present. -[ -x "`type -path $RQUOTAD`" ] || unset RQUOTAD - -# Handle how we were called. -case "$1" in -start) - if [ -d /proc/fs/nfsd -a ! -f /proc/fs/nfsd/exports ] ; - then - /bin/mount -t nfsd nfsd /proc/fs/nfsd - fi - echo -n "Exporting directories for $DESC..." - $EXPORTFS -r - echo "done." - - echo -n "Starting $NFSD: " - startdaemon $PREFIX$NFSD $RPCNFSDCOUNT - - # Disable NFSv3 on mountd if we don't have NFSv3 - ClearAddr= - if [ -f /proc/net/rpc/auth.unix.ip/channel ] ; then - if grep -s 127.0.0.1 /proc/net/rpc/auth.unix.ip/content > /dev/null ; then - : address already known - else - echo nfsd 127.0.0.1 2147483647 localhost > /proc/net/rpc/auth.unix.ip/channel - ClearAddr= - fi - fi - rpcinfo -u localhost nfs 3 &>/dev/null - if [ "$?" != "0" ] - then - RPCMOUNTDOPTS="$RPCMOUNTDOPTS --no-nfs-version 3" - fi - if [ -n "$ClearAddr" ]; then - echo nfsd 127.0.0.1 1 > /proc/net/rpc/auth.unix.ip/channel - fi - - echo -n "Starting $MOUNTD: " - startdaemon $MOUNTD $RPCMOUNTDOPTS - - # Start rquotad if it is set - if [ -n "$RQUOTAD" ] - then - echo -n "Starting $RQUOTAD: " - startdaemon $RQUOTAD - fi - - # if this lock file doesn't exist, init won't even try to run - # the shutdown script for this service on RedHat systems! - # on non-RedHat systems, /var/lock/subsys may not exist. - touch /var/lock/subsys/$SCRIPT_NAME &> /dev/null - ;; - -stop) - for process in $RQUOTAD $MOUNTD $NFSD - do - echo -n "Stopping $process: " - stopdaemon $process - done - - echo "Unexporting directories for $DESC..." - $EXPORTFS -au - if [ -f /proc/fs/nfsd/exports ] ; then /bin/umount -t nfsd nfsd /proc/fs/nfsd ; fi - rm -f /var/lock/subsys/$SCRIPT_NAME - echo "done." - ;; - -restart) - $0 stop - sleep 1 - $0 start - ;; - -reload) - # Update exports - echo "Re-exporting directories for $DESC..." - $EXPORTFS -r - touch /var/lock/subsys/$SCRIPT_NAME &> /dev/null - echo "done." - ;; - -status) - # First, check status of userland daemons - for process in $RQUOTAD $MOUNTD $NFSD - do - daemonstatus $process - done - exit 0 - ;; - -*) - echo "Usage: $0 {start|stop|status|restart|reload}" - exit 1 -esac -- 2.39.5