FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 05-22-2012, 05:01 PM
Chris Lumens
 
Default Enable setting up multiple layouts on the installed system

> diff --git a/pyanaconda/__init__.py b/pyanaconda/__init__.py
> index fd1e676..e29c85c 100644
> --- a/pyanaconda/__init__.py
> +++ b/pyanaconda/__init__.py
> @@ -279,6 +279,16 @@ class Anaconda(object):
> else:
> self.methodstr = methodstr
>
> + def writeLayouts(self, root):
> + conf_dir = os.path.join(root, "/etc/X11/xorg.conf.d")
> + conf_file = "01-anaconda-keyboard.conf"
> +
> + if not os.path.isdir(conf_dir):
> + os.makedirs(conf_dir)
> +
> + with open(os.path.join(conf_dir, conf_file), "w") as f:
> + f.write(self.ksdata.keyboard.xorg_conf)
> +
> def write(self):
> self.writeXdriver()
> self.instLanguage.write()
> @@ -293,3 +303,5 @@ class Anaconda(object):
> self.users.write()
> self.security.write()
> self.firewall.write()
> + self.writeLayouts(ROOT_PATH)
> +

anaconda.write is on the way out. In its place, what I'm doing is
adding execute methods to the appropriate classes in kickstart and
calling them from doInstall in install.py.

I'd say the writeLayouts code itself should probably not go into
kickstart.py, though. It should live somewhere else (perhaps just a
generic keyboard.py?) and be called from kickstart.

Having done all that, you won't need to do anything in livecd.py or
yuminstall.py. In fact, no one should be doing anything in that file
ever again.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 05-31-2012, 03:26 PM
Chris Lumens
 
Default Enable setting up multiple layouts on the installed system

> We need to write a config file to the /etc/X11/xorg.conf.d/ defining
> the layouts selected in the installation.

Sorry to throw you in a totally different direction now, but have you
seen:

http://www.freedesktop.org/wiki/Software/systemd/localed

That looks like it could take care of a lot of your keyboard.py code.

> diff --git a/pyanaconda/install.py b/pyanaconda/install.py
> index 86ae076..a323ca3 100644
> --- a/pyanaconda/install.py
> +++ b/pyanaconda/install.py
> @@ -79,6 +79,7 @@ def doInstall(storage, payload, ksdata, instClass):
> # Now run the execute methods of ksdata that require an installed system
> # to be present first.
> ksdata.services.execute(storage, ksdata, instClass)
> + ksdata.keyboard.execute()
>
> runPostScripts(ksdata.scripts)
>

I know it doesn't make a lot of sense for the keyboard command, but I'd
really like all execute methods to take the same set of arguments.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 06:16 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org