Mageia Bugzilla – Attachment 3859 Details for
Bug 9875
auto-inst goes into interactive mode if one phase is interactive and then ask for xdm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
the same fix but as a patch file ready to be used by the installer
patch (text/plain), 2.57 KB, created by
Thierry Vignaud
on 2013-05-01 05:14:57 CEST
(
hide
)
Description:
the same fix but as a patch file ready to be used by the installer
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2013-05-01 05:14:57 CEST
Size:
2.57 KB
patch
obsolete
>#!/usr/bin/perl >package any; > >log::l("PATCH: make set_autologin auto in auto_inst"); > >undef *set_autologin; >*set_autologin = sub { > my ($do_pkgs, $autologin, $o_auto) = @_; > log::l("set_autologin $autologin->{user} $autologin->{desktop}"); > my $do_autologin = bool2text($autologin->{user}); > > $autologin->{dm} ||= 'xdm'; > $do_pkgs->ensure_is_installed($autologin->{dm}, undef, $o_auto) > or return; > if ($autologin->{user} && is_standalone_autologin_needed($autologin->{dm})) { > $do_pkgs->ensure_is_installed('autologin', '/usr/bin/startx.autologin', $o_auto) > or return; > } > > #- Configure KDM / MDKKDM > my $kdm_conffile = common::read_alternative('kdm4-config'); > eval { common::update_gnomekderc_no_create($kdm_conffile, 'X-:0-Core' => ( > AutoLoginEnable => $do_autologin, > AutoLoginUser => $autologin->{user}, > )) } if -e $kdm_conffile; > > #- Configure GDM > my $gdm_conffile = "$::prefix/etc/X11/gdm/custom.conf"; > eval { update_gnomekderc($gdm_conffile, daemon => ( > AutomaticLoginEnable => $do_autologin, > AutomaticLogin => $autologin->{user}, > )) } if -e $gdm_conffile; > > my $xdm_autologin_cfg = "$::prefix/etc/sysconfig/autologin"; > # TODO: configure lxdm in /etx/lxdm/lxdm.conf > if (is_standalone_autologin_needed($autologin->{dm})) { > setVarsInShMode($xdm_autologin_cfg, 0644, > { USER => $autologin->{user}, AUTOLOGIN => bool2yesno($autologin->{user}), EXEC => '/usr/bin/startx.autologin' }); > } else { > unlink $xdm_autologin_cfg; > } > > my $sys_conffile = "$::prefix/etc/sysconfig/desktop"; > my %desktop = getVarsFromSh($sys_conffile); > $desktop{DESKTOP} = $autologin->{desktop}; > $desktop{DISPLAYMANAGER} = $autologin->{dm}; > setVarsInSh($sys_conffile, \%desktop); > > if ($autologin->{user}) { > my $home = (getpwnam($autologin->{user}))[7]; > set_window_manager($home, $autologin->{desktop}); > } >}; > >package install::steps; > >undef *addUser; >*addUser = sub { > my ($o) = @_; > my $users = $o->{users} ||= []; > > if ($::prefix) { > #- getpwnam, getgrnam, getgrid works > symlinkf("$::prefix/etc/passwd", '/etc/passwd'); > symlinkf("$::prefix/etc/group", '/etc/group'); > } > > any::add_users($users, $o->{authentication}); > > if ($o->{rpmsrate_flags_chosen}{CAT_X}) { > my $autologin = any::get_autologin(); > $autologin->{user} = $o->{autologin}; > $autologin->{desktop} = $o->{desktop} if $o->{desktop}; > $autologin->{dm} = $o->{dm} if $o->{dm}; > any::set_autologin($o->do_pkgs, $autologin, $o->{step}{auto}); > } > > install::any::disable_user_view() if @$users == (); >}; > >1;
#!/usr/bin/perl package any; log::l("PATCH: make set_autologin auto in auto_inst"); undef *set_autologin; *set_autologin = sub { my ($do_pkgs, $autologin, $o_auto) = @_; log::l("set_autologin $autologin->{user} $autologin->{desktop}"); my $do_autologin = bool2text($autologin->{user}); $autologin->{dm} ||= 'xdm'; $do_pkgs->ensure_is_installed($autologin->{dm}, undef, $o_auto) or return; if ($autologin->{user} && is_standalone_autologin_needed($autologin->{dm})) { $do_pkgs->ensure_is_installed('autologin', '/usr/bin/startx.autologin', $o_auto) or return; } #- Configure KDM / MDKKDM my $kdm_conffile = common::read_alternative('kdm4-config'); eval { common::update_gnomekderc_no_create($kdm_conffile, 'X-:0-Core' => ( AutoLoginEnable => $do_autologin, AutoLoginUser => $autologin->{user}, )) } if -e $kdm_conffile; #- Configure GDM my $gdm_conffile = "$::prefix/etc/X11/gdm/custom.conf"; eval { update_gnomekderc($gdm_conffile, daemon => ( AutomaticLoginEnable => $do_autologin, AutomaticLogin => $autologin->{user}, )) } if -e $gdm_conffile; my $xdm_autologin_cfg = "$::prefix/etc/sysconfig/autologin"; # TODO: configure lxdm in /etx/lxdm/lxdm.conf if (is_standalone_autologin_needed($autologin->{dm})) { setVarsInShMode($xdm_autologin_cfg, 0644, { USER => $autologin->{user}, AUTOLOGIN => bool2yesno($autologin->{user}), EXEC => '/usr/bin/startx.autologin' }); } else { unlink $xdm_autologin_cfg; } my $sys_conffile = "$::prefix/etc/sysconfig/desktop"; my %desktop = getVarsFromSh($sys_conffile); $desktop{DESKTOP} = $autologin->{desktop}; $desktop{DISPLAYMANAGER} = $autologin->{dm}; setVarsInSh($sys_conffile, \%desktop); if ($autologin->{user}) { my $home = (getpwnam($autologin->{user}))[7]; set_window_manager($home, $autologin->{desktop}); } }; package install::steps; undef *addUser; *addUser = sub { my ($o) = @_; my $users = $o->{users} ||= []; if ($::prefix) { #- getpwnam, getgrnam, getgrid works symlinkf("$::prefix/etc/passwd", '/etc/passwd'); symlinkf("$::prefix/etc/group", '/etc/group'); } any::add_users($users, $o->{authentication}); if ($o->{rpmsrate_flags_chosen}{CAT_X}) { my $autologin = any::get_autologin(); $autologin->{user} = $o->{autologin}; $autologin->{desktop} = $o->{desktop} if $o->{desktop}; $autologin->{dm} = $o->{dm} if $o->{dm}; any::set_autologin($o->do_pkgs, $autologin, $o->{step}{auto}); } install::any::disable_user_view() if @$users == (); }; 1;
View Attachment As Raw
Actions:
View
Attachments on
bug 9875
:
3848
|
3858
| 3859