projects
/
hvlinux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Enlevé références à sony Vaio, et teste la présence de /proc/acpi/button/lid/LID...
[hvlinux.git]
/
stage3
/
bootscripts
/
nfs
diff --git
a/stage3/bootscripts/nfs
b/stage3/bootscripts/nfs
index
e8621b7
..
e20b2b5
100755
(executable)
--- a/
stage3/bootscripts/nfs
+++ b/
stage3/bootscripts/nfs
@@
-18,16
+18,21
@@
source /etc/sysconfig/network/network-parameters
# Check that networking is up.
#[ ${NETWORKING} = "no" ] && exit ${EXIT_CODE_WARNING}
# Check that networking is up.
#[ ${NETWORKING} = "no" ] && exit ${EXIT_CODE_WARNING}
+# Check if NFS server functionality is desired
+if [ "x${NFS_SERVER_ENA}" != "xyes" -a "x${NFS_SERVER_ENA}" != "xYes" -a "x${NFS_SERVER_ENA}" != "xYES" ]; then
+ exit ${EXIT_CODE_SUCCESS}
+fi
+
# Check for presence of executables
# Check for presence of executables
-if [ ! -x /
usr/
sbin/rpc.nfsd ]; then
+if [ ! -x /sbin/rpc.nfsd ]; then
echo "Missing rpc.nfsd executable"
exit ${EXIT_CODE_WARNING}
fi
echo "Missing rpc.nfsd executable"
exit ${EXIT_CODE_WARNING}
fi
-if [ ! -x /
usr/
sbin/rpc.mountd ]; then
+if [ ! -x /sbin/rpc.mountd ]; then
echo "Missing rpc.mountd executable"
exit ${EXIT_CODE_WARNING}
fi
echo "Missing rpc.mountd executable"
exit ${EXIT_CODE_WARNING}
fi
-if [ ! -x /
usr/
sbin/exportfs ]; then
+if [ ! -x /sbin/exportfs ]; then
echo "Missing exportfs executable"
exit ${EXIT_CODE_WARNING}
fi
echo "Missing exportfs executable"
exit ${EXIT_CODE_WARNING}
fi
@@
-36,11
+41,6
@@
if [ ! -s /etc/exports ]; then
exit ${EXIT_CODE_WARNING}
fi
exit ${EXIT_CODE_WARNING}
fi
-if [ "x${NFS_SERVER_ENA}" != "xyes" -a "x${NFS_SERVER_ENA}" != "xYes" -a "x${NFS_SERVER_ENA}" != "xYES" ]; then
- msg_log "NFS server disabled in '/etc/sysconfig/network/network-parameters'"
- exit ${EXIT_CODE_WARNING}
-fi
-
# Check for and source configuration file otherwise set defaults
# TUNE_QUEUE: controls whether to up the size of input queues
[ -f /etc/sysconfig/network/nfs ] && . /etc/sysconfig/network/nfs
# Check for and source configuration file otherwise set defaults
# TUNE_QUEUE: controls whether to up the size of input queues
[ -f /etc/sysconfig/network/nfs ] && . /etc/sysconfig/network/nfs
@@
-72,19
+72,19
@@
nfsd_start() {
/sbin/sysctl -w net.core.rmem_default=$NFSD_QS >/dev/null 2>&1
/sbin/sysctl -w net.core.rmem_max=$NFSD_QS >/dev/null 2>&1
fi
/sbin/sysctl -w net.core.rmem_default=$NFSD_QS >/dev/null 2>&1
/sbin/sysctl -w net.core.rmem_max=$NFSD_QS >/dev/null 2>&1
fi
- cmd_run_log_box "Starting NFS services" loadproc /
usr/
sbin/exportfs -ra
+ cmd_run_log_box "Starting NFS services" loadproc /sbin/exportfs -ra
if [ -n "$RQUOTAD" -a "$RQUOTAD" != "no" ]; then
cmd_run_log_box "Starting NFS quotas" loadproc rpc.rquotad
fi
cmd_run_log_box "Starting NFS daemon" loadproc rpc.nfsd $NFSDCOUNT
if [ -n "$RQUOTAD" -a "$RQUOTAD" != "no" ]; then
cmd_run_log_box "Starting NFS quotas" loadproc rpc.rquotad
fi
cmd_run_log_box "Starting NFS daemon" loadproc rpc.nfsd $NFSDCOUNT
-
+
[ -n "$MOUNTD_PORT" ] \
&& MOUNTD_OPTIONS="$MOUNTD_OPTIONS -p $MOUNTD_PORT"
[ "$MOUNTD_TCP" = "no" -o "$MOUNTD_TCP" = "NO" ] \
&& MOUNTD_OPTIONS="$MOUNTD_OPTIONS --no-tcp"
[ -n "$MOUNTD_PORT" ] \
&& MOUNTD_OPTIONS="$MOUNTD_OPTIONS -p $MOUNTD_PORT"
[ "$MOUNTD_TCP" = "no" -o "$MOUNTD_TCP" = "NO" ] \
&& MOUNTD_OPTIONS="$MOUNTD_OPTIONS --no-tcp"
-
+
cmd_run_log_box "Starting NFS mountd" loadproc rpc.mountd $MOUNTD_OPTIONS
cmd_run_log_box "Starting NFS mountd" loadproc rpc.mountd $MOUNTD_OPTIONS
-
+
touch /var/lock/subsys/nfs
# reset input queue for rest of network services
if [ "$TUNE_QUEUE" = "yes" ]; then
touch /var/lock/subsys/nfs
# reset input queue for rest of network services
if [ "$TUNE_QUEUE" = "yes" ]; then
@@
-103,7
+103,7
@@
nfsd_stop() {
# Do it the last so that clients can still access the server
# when the server is running.
echo "Refreshing NFS Exported Filesystems..."
# Do it the last so that clients can still access the server
# when the server is running.
echo "Refreshing NFS Exported Filesystems..."
- /
usr/
sbin/exportfs -au
+ /sbin/exportfs -au
rm -f /var/lock/subsys/nfs
}
rm -f /var/lock/subsys/nfs
}
@@
-114,16
+114,16
@@
case "$1" in
start)
cmd_run_log_box_warn "NFS server start" nfsd_start
;;
start)
cmd_run_log_box_warn "NFS server start" nfsd_start
;;
-
+
stop)
cmd_run_log_box_warn "NFS server stop" nfsd_stop
;;
stop)
cmd_run_log_box_warn "NFS server stop" nfsd_stop
;;
-
+
reload)
reload)
- /
usr/
sbin/exportfs -ra
+ /sbin/exportfs -ra
touch /var/lock/subsys/nfs
;;
touch /var/lock/subsys/nfs
;;
-
+
restart)
$0 stop
sleep 1
restart)
$0 stop
sleep 1
@@
-137,7
+137,7
@@
case "$1" in
statusproc rpc.rquotad
fi
;;
statusproc rpc.rquotad
fi
;;
-
+
*)
echo "Usage: $0 {reload|restart|start|status|stop}"
exit ${EXIT_CODE_FAILURE}
*)
echo "Usage: $0 {reload|restart|start|status|stop}"
exit ${EXIT_CODE_FAILURE}