removeBridge :: String -> IO ()
removeBridge bridge = do
      exists <- doesDirectoryExist (sysfsnet </> bridge </> "brif")
      when exists $ do
         ifs <- getDirectoryContents (sysfsnet </> bridge </> "brif")
         mapM_ (delif bridge) ifs
         readProcessWithExitCode_closeFds "ifconfig" [bridge, "down"] []
         readProcessWithExitCode_closeFds "brctl" ["delbr", bridge] []
         return ()
removeBridge :: String -> IO ()
removeBridge bridge = do
      exists <- doesDirectoryExist (sysfsnet </> bridge </> "brif")
      when exists $ do
         ifs <- getDirectoryContents (sysfsnet </> bridge </> "brif")
         mapM_ (delif bridge) ifs
         readProcessWithExitCode_closeFds "ifconfig" [bridge, "down"] []
         readProcessWithExitCode_closeFds "brctl" ["delbr", bridge] []
         return ()
removeBridge bridge = do
      exists <- doesDirectoryExist (sysfsnet </> bridge </> "brif")
      when exists $ do
         ifs <- getDirectoryContents (sysfsnet </> bridge </> "brif")
         mapM_ (delif bridge) ifs
         readProcessWithExitCode_closeFds "ifconfig" [bridge, "down"] []
         readProcessWithExitCode_closeFds "brctl" ["delbr", bridge] []
         return ()