diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-05-20 21:10:57 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-05-20 21:10:57 +0000 |
commit | 57ba8a64b3f7ec8a5dc0a4861941f175b749839c (patch) | |
tree | a197504b1169e7ac168ef26d916542b560ba1aa7 /perl-install | |
parent | 207f15207aa0b43d089952f9abed7d677c83b223 (diff) | |
download | drakx-57ba8a64b3f7ec8a5dc0a4861941f175b749839c.tar drakx-57ba8a64b3f7ec8a5dc0a4861941f175b749839c.tar.gz drakx-57ba8a64b3f7ec8a5dc0a4861941f175b749839c.tar.bz2 drakx-57ba8a64b3f7ec8a5dc0a4861941f175b749839c.tar.xz drakx-57ba8a64b3f7ec8a5dc0a4861941f175b749839c.zip |
(set_permissions): owner and group are optional parameters
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/common.pm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm index 87a491bcd..cce250899 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -222,19 +222,19 @@ sub secured_file { } sub set_permissions { - my ($file, $perms, $owner, $group) = @_; + my ($file, $perms, $o_owner, $o_group) = @_; # We only need to set the permissions during installation to be able to # print test pages. After installation the devfsd daemon does the business # automatically. return 1 unless $::isInstall; - if ($owner && $group) { - run_program::rooted($::prefix, "/bin/chown", "$owner.$group", $file) + if ($o_owner && $o_group) { + run_program::rooted($::prefix, "/bin/chown", "$o_owner.$o_group", $file) or die "Could not start chown!"; - } elsif ($owner) { - run_program::rooted($::prefix, "/bin/chown", $owner, $file) + } elsif ($o_owner) { + run_program::rooted($::prefix, "/bin/chown", $o_owner, $file) or die "Could not start chown!"; - } elsif ($group) { - run_program::rooted($::prefix, "/bin/chgrp", $group, $file) + } elsif ($o_group) { + run_program::rooted($::prefix, "/bin/chgrp", $o_group, $file) or die "Could not start chgrp!"; } run_program::rooted($::prefix, "/bin/chmod", $perms, $file) |