summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-12-17 17:28:14 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-12-17 17:28:14 +0000
commit224b14cb6b741fb15dcc4fd170306dc0165cba29 (patch)
tree6135c5e28a8638890df3e201b5b349136aedb0ba /perl-install/install_steps.pm
parentd057708b3e1217b809c383563d54ae9e316bf189 (diff)
downloaddrakx-224b14cb6b741fb15dcc4fd170306dc0165cba29.tar
drakx-224b14cb6b741fb15dcc4fd170306dc0165cba29.tar.gz
drakx-224b14cb6b741fb15dcc4fd170306dc0165cba29.tar.bz2
drakx-224b14cb6b741fb15dcc4fd170306dc0165cba29.tar.xz
drakx-224b14cb6b741fb15dcc4fd170306dc0165cba29.zip
no_comment
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm26
1 files changed, 17 insertions, 9 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index b1e439058..ffdd0ceee 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -272,8 +272,14 @@ sub afterInstallPackages($) {
"$o->{prefix}/etc/skel/Desktop/Autostart/kapm.kdelnk") };
}
+ my $msec = "$o->{prefix}/etc/security/msec";
+ substInFile { s/^audio\n//; $_ .= "audio\n" if eof } "$msec/group.conf" if -d $msec;
+
my $p = $o->{packages}{urpmi};
- install_any::install_urpmi($o->{prefix}, $o->{method}) if $p && $p->{selected};
+ if ($p && $p->{selected}) {
+ install_any::install_urpmi($o->{prefix}, $o->{method});
+ substInFile { s/^urpmi\n//; $_ .= "urpmi\n" if eof } "$msec/group.conf" if -d $msec;
+ }
}
#------------------------------------------------------------------------------
@@ -475,21 +481,23 @@ sub addUser($) {
open F, ">> $p/etc/group" or die "can't append to group file: $!";
print F "$_->{name}:x:$_->{gid}:\n" foreach @l;
- foreach (@l) {
- if (! -d "$p$_->{home}") {
+ foreach my $u (@l) {
+ if (! -d "$p$u->{home}") {
my $mode = $o->{security} < 2 ? 0755 : 0750;
- eval { commands::cp("-f", "$p/etc/skel", "$p$_->{home}") };
+ eval { commands::cp("-f", "$p/etc/skel", "$p$u->{home}") };
if ($@) {
- log::l("copying of skel failed: $@"); mkdir("$p$_->{home}", $mode);
+ log::l("copying of skel failed: $@"); mkdir("$p$u->{home}", $mode);
} else {
- chmod $mode, "$p$_->{home}";
+ chmod $mode, "$p$u->{home}";
}
}
- commands::chown_("-r", "$_->{uid}.$_->{gid}", "$p$_->{home}")
- if $_->{uid} != $_->{oldu} || $_->{gid} != $_->{oldg};
+ commands::chown_("-r", "$u->{uid}.$u->{gid}", "$p$u->{home}")
+ if $u->{uid} != $u->{oldu} || $u->{gid} != $u->{oldg};
- run_program::rooted($p, "usermod", "-G", "urpmi", $_->{name}) if $o->{security} < 3;
+ my $msec = "$o->{prefix}/etc/security/msec";
+ substInFile { s/^$u->{name}\n//; $_ .= "$u->{name}\n" if eof } "$msec/user.conf" if -d $msec;
}
+ run_program::rooted($o->{prefix}, "/etc/security/msec/init-sh/grpuser.sh --refresh");
}
#------------------------------------------------------------------------------