protected void checkMounts(String procFile) throws Exception { List<Mount> mounts = parse(procFile); for (Mount mount : mounts) { if (!readWriteFilesystems.containsKey(mount.mountPoint)) if (mount.options.contains("rw")) readWriteFilesystems.put(mount.mountPoint, true); else if (mount.options.contains("ro")) readWriteFilesystems.put(mount.mountPoint, false); else throw new Exception("Filesystem " + mount + " does not have ro or rw option"); else if (mount.options.contains("ro") && readWriteFilesystems.get(mount.mountPoint)) throw new Exception("Filesystem " + mount.mountPoint + " switched to read only"); } }
public FileSystemMonitor(final String procFile, long period) throws IOException { List<Mount> mounts = parse(procFile);
protected void checkMounts(String procFile) throws Exception { List<Mount> mounts = parse(procFile); for (Mount mount : mounts) { if (!readWriteFilesystems.containsKey(mount.mountPoint)) if (mount.options.contains("rw")) readWriteFilesystems.put(mount.mountPoint, true); else if (mount.options.contains("ro")) readWriteFilesystems.put(mount.mountPoint, false); else throw new Exception("Filesystem " + mount + " does not have ro or rw option"); else if (mount.options.contains("ro") && readWriteFilesystems.get(mount.mountPoint)) throw new Exception("Filesystem " + mount.mountPoint + " switched to read only"); } }
protected void checkMounts(String procFile) throws Exception { List<Mount> mounts = parse(procFile); for (Mount mount : mounts) { if (!readWriteFilesystems.containsKey(mount.mountPoint)) if (mount.options.contains("rw")) readWriteFilesystems.put(mount.mountPoint, true); else if (mount.options.contains("ro")) readWriteFilesystems.put(mount.mountPoint, false); else throw new Exception("Filesystem " + mount + " does not have ro or rw option"); else if (mount.options.contains("ro") && readWriteFilesystems.get(mount.mountPoint)) throw new Exception("Filesystem " + mount.mountPoint + " switched to read only"); } }
public FileSystemMonitor(final String procFile, long period) throws IOException { List<Mount> mounts = parse(procFile);
public FileSystemMonitor(final String procFile, long period) throws IOException { List<Mount> mounts = parse(procFile);