public bool CanStop() { if (systemd != null) { return(String.Equals(systemd.CanPowerOff(), "yes")); } else if (consolekit != null) { return(consolekit.CanStop()); } Log <SystemManager> .Debug("No consolekit or systemd bus available"); return(false); }