]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Supress errors when checking if kernel module loading is disabled
authorRuss Allbery <rra@debian.org>
Sat, 25 Dec 2010 01:18:38 +0000 (17:18 -0800)
committerRuss Allbery <rra@debian.org>
Sat, 25 Dec 2010 01:18:38 +0000 (17:18 -0800)
In the openafs-client init script, suppress errors from cat if the
modules_disabled flag file in /proc/sys/kernel doesn't exist, since
this was added in 2.6.31.

debian/openafs-client.init

index 63754691158040956a39561542c7d5c08735f357..c8ccd0cdf747c3919687b6d67fa7d020e3b94cdd 100755 (executable)
@@ -52,7 +52,7 @@ is_on() {
 # Determine if kernel module loading is disabled.  If it's not, don't attempt
 # to stop or restart AFS, since we'll end up in a bad inconsistent state.
 is_loading_disabled() {
-    loading=`cat /proc/sys/kernel/modules_disabled`
+    loading=`cat /proc/sys/kernel/modules_disabled 2>/dev/null`
     if [ "$loading" = 1 ] ; then
         return 0
     else