summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-11-30 14:37:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-11-30 14:37:11 +0000
commitc58d7cf3ea859cc1c767a40934bd65fd58fa3c3f (patch)
treed149416f9663437938d19e6df3f2b66512e072e2
parent5d72c84a9b2db90cd61f8b06dfc5e9b20658e211 (diff)
downloaddrakx-backup-do-not-use-c58d7cf3ea859cc1c767a40934bd65fd58fa3c3f.tar
drakx-backup-do-not-use-c58d7cf3ea859cc1c767a40934bd65fd58fa3c3f.tar.gz
drakx-backup-do-not-use-c58d7cf3ea859cc1c767a40934bd65fd58fa3c3f.tar.bz2
drakx-backup-do-not-use-c58d7cf3ea859cc1c767a40934bd65fd58fa3c3f.tar.xz
drakx-backup-do-not-use-c58d7cf3ea859cc1c767a40934bd65fd58fa3c3f.zip
create any::set_root_passwd() and use it
-rw-r--r--perl-install/any.pm7
-rw-r--r--perl-install/install_steps.pm4
2 files changed, 8 insertions, 3 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 0982a5a1f..1d9648403 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -783,6 +783,13 @@ sub selectCountry {
$locale->{country} = $other || !@best ? $ext_country : $country;
}
+sub set_root_passwd {
+ my ($superuser, $authentication) = @_;
+ $superuser->{name} = 'root';
+ write_passwd_user($superuser, $authentication->{md5});
+ delete $superuser->{name};
+}
+
sub write_passwd_user {
my ($u, $isMD5) = @_;
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 6eb2e0ae7..d6467efea 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -759,9 +759,7 @@ sub configurePrinter {
sub setRootPassword {
my ($o) = @_;
$o->{superuser} ||= {};
- $o->{superuser}{name} = 'root';
- any::write_passwd_user($o->{superuser}, $o->{authentication}{md5});
- delete $o->{superuser}{name};
+ any::set_root_passwd($o->{superuser}, $o->{authentication});
install_any::set_authentication($o);
}