diff options
author | chip <chip> | 2003-10-29 21:32:50 +0000 |
---|---|---|
committer | chip <chip> | 2003-10-29 21:32:50 +0000 |
commit | b7f4ad19f9b3b8e0f93da719a86d0e865be5ab75 (patch) | |
tree | 9170808aa98f49d427ad1fa110e80d5a972ed616 /debian/nfs-common.init | |
parent | 06e7eafaf439878f0da251e53133e7dd6972b28c (diff) | |
download | nfs-utils-b7f4ad19f9b3b8e0f93da719a86d0e865be5ab75.tar.gz nfs-utils-b7f4ad19f9b3b8e0f93da719a86d0e865be5ab75.tar.xz nfs-utils-b7f4ad19f9b3b8e0f93da719a86d0e865be5ab75.zip |
Use kernel version to short-circuit the lockd test in nfs-common.init.
Diffstat (limited to 'debian/nfs-common.init')
-rwxr-xr-x | debian/nfs-common.init | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/debian/nfs-common.init b/debian/nfs-common.init index f6c4a8a..59fc59d 100755 --- a/debian/nfs-common.init +++ b/debian/nfs-common.init @@ -22,16 +22,25 @@ if [ -f $DEFAULTFILE ]; then . $DEFAULTFILE fi -# Determine whether lockd is required +# Determine whether lockd daemon is required. case "$NEED_LOCKD" in yes|no) ;; -*) # We must be conservative and run lockd, - # unless we can prove that it's not required. - NEED_LOCKD=yes - if test -f /proc/ksyms - then - grep -q lockdctl /proc/ksyms || NEED_LOCKD=no - fi +*) case `uname -r` in + '' | [01].* | 2.[0123].* ) + # Older kernels may or may not need a lockd daemon. + # We must assume they do, unless we can prove otherwise. + # (A false positive here results only in a harmless message.) + NEED_LOCKD=yes + if test -f /proc/ksyms + then + grep -q lockdctl /proc/ksyms || NEED_LOCKD=no + fi + ;; + + *) # Modern kernels (>= 2.4) start a lockd thread automatically. + NEED_LOCKD=no + ;; + esac ;; esac |