From: Russ Allbery Date: Sat, 25 Dec 2010 01:18:38 +0000 (-0800) Subject: Supress errors when checking if kernel module loading is disabled X-Git-Tag: debian/1.6.0.pre1-1~10 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=5c34a07d672312a44d72e30ba6eb437bbe9a384a;p=packages%2Fo%2Fopenafs.git Supress errors when checking if kernel module loading is disabled 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. --- diff --git a/debian/openafs-client.init b/debian/openafs-client.init index 637546911..c8ccd0cdf 100755 --- a/debian/openafs-client.init +++ b/debian/openafs-client.init @@ -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