From a6f8275a74dd684e2b35010b0ba28a1d3b9cca23 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 1 Aug 2003 20:52:48 +0000 Subject: use $::prefix --- perl-install/any.pm | 7 +++---- perl-install/install_any.pm | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/perl-install/any.pm b/perl-install/any.pm index 0be989f98..83083afa1 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -68,10 +68,9 @@ sub crypt { my ($password, $md5) = @_; crypt($password, $md5 ? '$1$' . salt(8) : 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 enableShadow() { + run_program::rooted($::prefix, "pwconv") or log::l("pwconv failed"); + run_program::rooted($::prefix, "grpconv") or log::l("grpconv failed"); } sub hdInstallPath() { diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 0ff254444..a7157a667 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -430,8 +430,7 @@ sub addToBeDone(&$) { sub setAuthentication { my ($o) = @_; my ($shadow, $ldap, $nis, $winbind, $winpass) = @{$o->{authentication} || {}}{qw(shadow LDAP NIS winbind winpass)}; - my $p = $o->{prefix}; - any::enableShadow($p) if $shadow; + any::enableShadow() if $shadow; if ($ldap) { $o->pkg_install(qw(chkauth openldap-clients nss_ldap pam_ldap)); run_program::rooted($o->{prefix}, "/usr/sbin/chkauth", "ldap", "-D", $o->{netc}{LDAPDOMAIN}, "-s", $ldap); @@ -445,9 +444,9 @@ sub setAuthentication { substInFile { $_ = "#~$_" unless /^#/; $_ .= "$t $nis\n" if eof; - } "$p/etc/yp.conf"; + } "$::prefix/etc/yp.conf"; require network; - network::write_conf("$p/etc/sysconfig/network", $o->{netc}); + network::write_conf("$::prefix/etc/sysconfig/network", $o->{netc}); } elsif ($winbind) { my $domain = $o->{netc}{WINDOMAIN}; $domain =~ tr/a-z/A-Z/; -- cgit v1.2.1