diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-05-27 06:36:32 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-05-27 06:36:32 +0000 |
commit | 7393d8cad695e981eaad90fb1705dd0eb1c3b6e2 (patch) | |
tree | e140fda64fa90ba75aa888a07b4c91e5e1128b68 /perl-install/standalone/drakedm | |
parent | 9e3ef088b3792a2f8ef2eacd36f4e4c4bc5bd671 (diff) | |
download | drakx-backup-do-not-use-7393d8cad695e981eaad90fb1705dd0eb1c3b6e2.tar drakx-backup-do-not-use-7393d8cad695e981eaad90fb1705dd0eb1c3b6e2.tar.gz drakx-backup-do-not-use-7393d8cad695e981eaad90fb1705dd0eb1c3b6e2.tar.bz2 drakx-backup-do-not-use-7393d8cad695e981eaad90fb1705dd0eb1c3b6e2.tar.xz drakx-backup-do-not-use-7393d8cad695e981eaad90fb1705dd0eb1c3b6e2.zip |
handle /etc/X11/dm.d/* entries (as proposed by Loic Baudry)
Diffstat (limited to 'perl-install/standalone/drakedm')
-rw-r--r-- | perl-install/standalone/drakedm | 11 |
1 files changed, 11 insertions, 0 deletions
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)) { |