diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-08-17 00:39:01 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-08-17 00:39:01 +0000 |
commit | 11b0b944ddde76b4982fa2f9e2118dcee5035f80 (patch) | |
tree | a873f848dcf1eda96b89a0319f8923e10bbc5b4a /perl-install/any.pm | |
parent | d77799bb5ce63ecac4de72e1b27f56d7d22fd048 (diff) | |
download | drakx-11b0b944ddde76b4982fa2f9e2118dcee5035f80.tar drakx-11b0b944ddde76b4982fa2f9e2118dcee5035f80.tar.gz drakx-11b0b944ddde76b4982fa2f9e2118dcee5035f80.tar.bz2 drakx-11b0b944ddde76b4982fa2f9e2118dcee5035f80.tar.xz drakx-11b0b944ddde76b4982fa2f9e2118dcee5035f80.zip |
no_comment
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r-- | perl-install/any.pm | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index 7e50c1dbc..1c0d9c368 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -12,6 +12,7 @@ use commands; use detect_devices; use fsedit; use run_program; +use log; #-PO: names (tie, curly...) have corresponding icons for kdm my @users_male = (__("tie"), __("default"), __("curly")); #- don't change the names, files correspond to them @@ -51,6 +52,28 @@ sub addUsers { addKdmIcon($prefix, 'root', 'hat', 'force'); } +sub crypt { + my ($password, $md5) = @_; + $md5 ? + c::crypt_md5($password, salt(8)) : + crypt ($password, salt(2)); +} +sub enableShadow { + my ($prefix) = @_; + run_program::rooted($prefix, "pwconv") or log::l("pwconv failed"); + run_program::rooted($prefix, "grpconv") or log::l("grpconv failed"); +} +sub enableMD5Shadow { + my ($prefix, $shadow, $md5) = @_; + substInFile { + if (/^password.*pam_pwdb.so/) { + s/\s*shadow//; s/\s*md5//; + s/$/ shadow/ if $shadow; + s/$/ md5/ if $md5; + } + } grep { -r $_ } map { "$prefix/etc/pam.d/$_" } qw(login rlogin passwd); +} + sub setupBootloader { my ($in, $b, $hds, $fstab, $security, $prefix, $more) = @_; @@ -213,4 +236,23 @@ sub setAutologin { # (dam's) : a patch for gdm is being done. } + +sub writeandclean_ldsoconf { + my ($prefix) = @_; + my $file = "$prefix/etc/ld.so.conf"; + + log::l("before: ", cat_($file)); + output $file, + grep { !m|^(/usr)?/lib$| } #- no need to have /lib and /usr/lib in ld.so.conf + uniq cat_($file), "/usr/X11R6/lib\n"; + log::l("after: ", cat_($file)); +} + +sub shells { + my ($prefix) = @_; + grep { -x "$prefix$_" } map { chomp; $_ } cat_("$prefix/etc/shells"); +} + + + 1; |