From 5c34a07d672312a44d72e30ba6eb437bbe9a384a Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Fri, 24 Dec 2010 17:18:38 -0800 Subject: [PATCH] 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. --- debian/openafs-client.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5