From c0f09ac4ddfd87840ab130a4d632cc54eea52689 Mon Sep 17 00:00:00 2001 From: Joel Andres Granados Date: Mon, 14 Jul 2008 18:25:16 +0200 Subject: Make xserver plugin a little friendlier. - Put the previous xorg config file in a backup file where the user can see it. - Give the user extra information about how to create an xorg configuration file. --- plugins/xserver.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/plugins/xserver.py b/plugins/xserver.py index 802b9f5..71c7d2c 100644 --- a/plugins/xserver.py +++ b/plugins/xserver.py @@ -143,13 +143,23 @@ class Xserver(Plugin): self._reporting.info("Testing modified environment", level = PLUGIN, origin = self) if self.serverStart(): - self._reporting.info("X server started successfully with new file.", - level = PLUGIN, origin = self) + self._reporting.info("X server started successfully with no " + "config file.", level = PLUGIN, origin = self) + self._reporting.info("If you must have a config file, create " + "one with system-config-display and place it at " + "/etc/X11/xorg.conf", level = PLUGIN, origin = self ) self._result = ReturnSuccess + + # Lets give the user his previous file. + if self.backupSpace.exists(path=self.confPath): + self.backupSpace.restoreName(self.confPath, + "%s-FAKbackup"%self.confPath) + else: - self._reporting.info("X server is still missconfigured with new " - "file.", level = PLUGIN, origin = self) + self._reporting.info("X server is does not autodetect the users " + "environment.", level = PLUGIN, origin = self) self._result = ReturnFailure + self._issue.set(fixed = (self._result == ReturnSuccess), reporting = self._reporting, level = PLUGIN, origin = self) -- cgit