From 2fe068efbe6cead812630e0c426c2247f5431ce7 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 4 May 2014 13:43:47 +0200 Subject: Accepting "unknown" as network device state Cf. discussion of issue #98 --- src/Plugins/Monitors/Net.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Plugins/Monitors/Net.hs b/src/Plugins/Monitors/Net.hs index c2e1cf2..e49d1aa 100644 --- a/src/Plugins/Monitors/Net.hs +++ b/src/Plugins/Monitors/Net.hs @@ -1,7 +1,7 @@ ----------------------------------------------------------------------------- -- | -- Module : Plugins.Monitors.Net --- Copyright : (c) 2011, 2012, 2013 Jose Antonio Ortega Ruiz +-- Copyright : (c) 2011, 2012, 2013, 2014 Jose Antonio Ortega Ruiz -- (c) 2007-2010 Andrea Rossato -- License : BSD-style (see LICENSE) -- @@ -67,7 +67,7 @@ existingDevs = getDirectoryContents "/sys/class/net" >>= filterM isDev isUp :: String -> IO Bool isUp d = do operstate <- B.readFile (operstateDir d) - return $ "up" == (B.unpack . head . B.lines) operstate + return $ (B.unpack . head . B.lines) operstate `elem` ["up", "unknown"] readNetDev :: [String] -> IO NetDev readNetDev (d:x:y:_) = do -- cgit v1.2.3