summaryrefslogtreecommitdiffstats
path: root/desktop.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2001-06-27 19:00:21 +0000
committerMatt Wilson <msw@redhat.com>2001-06-27 19:00:21 +0000
commit8bf1c802aade8d49dc1232a3f4b76c31559833b6 (patch)
treef22e29fcbbe94e3b524033a0bbec786dfff23d45 /desktop.py
parenta08363ea14356bc4077d922c80c0584db10b51ac (diff)
downloadanaconda-8bf1c802aade8d49dc1232a3f4b76c31559833b6.tar.gz
anaconda-8bf1c802aade8d49dc1232a3f4b76c31559833b6.tar.xz
anaconda-8bf1c802aade8d49dc1232a3f4b76c31559833b6.zip
defer writing inittab rl default and desktop until after we config X - write it at the same time we write the X config. Fixed writing of /etc/sysconfig/desktop
Diffstat (limited to 'desktop.py')
-rw-r--r--desktop.py23
1 files changed, 15 insertions, 8 deletions
diff --git a/desktop.py b/desktop.py
index fb5734ee6..6d423f22b 100644
--- a/desktop.py
+++ b/desktop.py
@@ -14,29 +14,30 @@
#
import string
+from simpleconfig import SimpleConfigFile
from log import log
-class Desktop:
+class Desktop (SimpleConfigFile):
#
# This class represents the default desktop to run and the default runlevel
# to start in
#
- def setDefaultDesktop(self, desktop):
- self.desktop = desktop
-
def setDefaultRunLevel(self, runlevel):
if str(runlevel) != "3" and str(runlevel) != "5":
raise RuntimeError, "Desktop::setDefaultRunLevel() - Must specify runlevel as 3 or 5!"
self.runlevel = runlevel
- def getDefaultDesktop(self):
- return self.desktop
-
def getDefaultRunLevel(self):
return self.runlevel
+ def setDefaultDesktop(self, desktop):
+ self.info["DESKTOP"] = desktop
+
+ def getDefaultDesktop(self):
+ return self.get("DESKTOP")
+
def __init__ (self):
- self.desktop = None
+ SimpleConfigFile.__init__ (self)
self.runlevel = 3
def write (self, instPath):
@@ -55,3 +56,9 @@ class Desktop:
line = string.join (fields, ':')
inittab.write (line)
inittab.close ()
+
+ f = open(instPath + "/etc/sysconfig/desktop", "w")
+ f.write(str (self))
+ f.close()
+
+