From 7393d8cad695e981eaad90fb1705dd0eb1c3b6e2 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 27 May 2005 06:36:32 +0000 Subject: handle /etc/X11/dm.d/* entries (as proposed by Loic Baudry) --- perl-install/standalone/drakedm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'perl-install/standalone') diff --git a/perl-install/standalone/drakedm b/perl-install/standalone/drakedm index fab431dd8..e02b46ee4 100644 --- a/perl-install/standalone/drakedm +++ b/perl-install/standalone/drakedm @@ -29,6 +29,9 @@ $ugtk2::wm_icon = "/usr/share/mcc/themes/default/drakedm-mdk.png"; my $in = 'interactive'->vnew('su'); +# directory in which display managers put a config file +my $dm_dir = '/etc/X11/dm.d'; + my $cfg_file = '/etc/sysconfig/desktop'; my %dm = ('GNOME' => [ N("GDM (GNOME Display Manager)"), '/usr/bin/gdm', 'gdm' ], @@ -37,6 +40,14 @@ my %dm = ('GNOME' => [ N("GDM (GNOME Display Manager)"), '/usr/bin/gdm', 'gdm' ] 'XDM' => [ N("XDM (X Display Manager)"), '/usr/bin/X11/xdm', 'xorg-x11' ], ); +# add non hard-wired display managers +foreach (grep { !/\.rpm/ } glob("$dm_dir/*")) { + my %l = map { /(\S+)=(.*)/ } cat_($_); + if ($l{NAME}) { + $dm{$l{NAME}} ||= [ $l{DESCRIPTION}, $l{EXEC}, $l{PACKAGE} ]; + } +} + my $dm; foreach (cat_($cfg_file)) { -- cgit v1.2.1