--- unfs3.init.orig 2007-08-07 17:25:05 +0300 +++ unfs3.init 2007-08-07 20:10:48 +0300 @@ -1,6 +1,6 @@ #!/bin/sh # -# nfs This shell script takes care of starting and stopping +# unfs This shell script takes care of starting and stopping # the NFS services. # # chkconfig: 234 60 20 @@ -23,15 +23,23 @@ NFSD=unfsd BINARY=/usr/sbin/$NFSD EXPORTFS=/usr/sbin/exportfs -EXPORTS=/etc/exports [ -x "$BINARY" ] || exit SourceIfNotEmpty /etc/sysconfig/nfs -SourceIfNotEmpty /etc/syscongig/unfs3 +SourceIfNotEmpty /etc/sysconfig/unfs3 -LOCKFILE=/var/lock/subsys/nfs -PIDFILE=/var/run/nfs.pid +[ -z "$NFS_PORT" ] || UNFS_OPTS="-n $NFS_PORT $UNFS_OPTS" +[ -z "$MOUNTD_PORT" ] || UNFS_OPTS="-m $MOUNTD_PORT $UNFS_OPTS" +test -z "$EXPORTS" && test -s /etc/exports.unfs && EXPORTS=/etc/exports.unfs +if [ -z "$EXPORTS" ]; then + EXPORTS=/etc/exports +else + UNFS_OPTS="-e $EXPORTS $UNFS_OPTS" +fi + +LOCKFILE=/var/lock/subsys/unfs +PIDFILE=/var/run/unfs.pid RETVAL=0 @@ -40,7 +48,7 @@ # Don't start anything when exports is empty [ -s "$EXPORTS" ] || return - # nfsd + # unfsd start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- $NFSD -i $PIDFILE $UNFS_OPTS RETVAL=$? return $RETVAL