View | Details | Raw Unified | Return to bug 12488
Collapse All | Expand All

(-)unfs3.init.orig (-6 / +14 lines)
Lines 1-6 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# nfs           This shell script takes care of starting and stopping
3
# unfs          This shell script takes care of starting and stopping
4
#               the NFS services.
4
#               the NFS services.
5
#
5
#
6
# chkconfig: 234 60 20
6
# chkconfig: 234 60 20
Lines 23-37 Link Here
23
NFSD=unfsd
23
NFSD=unfsd
24
BINARY=/usr/sbin/$NFSD
24
BINARY=/usr/sbin/$NFSD
25
EXPORTFS=/usr/sbin/exportfs
25
EXPORTFS=/usr/sbin/exportfs
26
EXPORTS=/etc/exports
27
26
28
[ -x "$BINARY"  ] || exit
27
[ -x "$BINARY"  ] || exit
29
28
30
SourceIfNotEmpty /etc/sysconfig/nfs
29
SourceIfNotEmpty /etc/sysconfig/nfs
31
SourceIfNotEmpty /etc/syscongig/unfs3
30
SourceIfNotEmpty /etc/sysconfig/unfs3
32
31
33
LOCKFILE=/var/lock/subsys/nfs
32
[ -z "$NFS_PORT" ] || UNFS_OPTS="-n $NFS_PORT $UNFS_OPTS"
34
PIDFILE=/var/run/nfs.pid
33
[ -z "$MOUNTD_PORT" ] || UNFS_OPTS="-m $MOUNTD_PORT $UNFS_OPTS"
34
test -z "$EXPORTS" && test -s /etc/exports.unfs && EXPORTS=/etc/exports.unfs
35
if [ -z "$EXPORTS" ]; then
36
    EXPORTS=/etc/exports
37
else
38
    UNFS_OPTS="-e $EXPORTS $UNFS_OPTS"
39
fi
40
41
LOCKFILE=/var/lock/subsys/unfs
42
PIDFILE=/var/run/unfs.pid
35
43
36
RETVAL=0
44
RETVAL=0
37
45
Lines 40-46 Link Here
40
	# Don't start anything when exports is empty
48
	# Don't start anything when exports is empty
41
	[ -s "$EXPORTS" ] || return
49
	[ -s "$EXPORTS" ] || return
42
50
43
	# nfsd
51
	# unfsd
44
	start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- $NFSD -i $PIDFILE $UNFS_OPTS
52
	start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- $NFSD -i $PIDFILE $UNFS_OPTS
45
	RETVAL=$?
53
	RETVAL=$?
46
	return $RETVAL
54
	return $RETVAL

Return to bug 12488