summaryrefslogtreecommitdiffstats
path: root/move
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-06-23 03:07:58 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-06-23 03:07:58 +0000
commit953db332ce73dbfd40669d66bf23552dbd9c7838 (patch)
tree8b3d0cdd0790846e6ed833bd20f8e77d5080c0cc /move
parent9d596234ba111ec5899dacc466d30a6b612e4262 (diff)
downloaddrakx-953db332ce73dbfd40669d66bf23552dbd9c7838.tar
drakx-953db332ce73dbfd40669d66bf23552dbd9c7838.tar.gz
drakx-953db332ce73dbfd40669d66bf23552dbd9c7838.tar.bz2
drakx-953db332ce73dbfd40669d66bf23552dbd9c7838.tar.xz
drakx-953db332ce73dbfd40669d66bf23552dbd9c7838.zip
better code for installing config files listed in keyfiles (and use cp_f)
Diffstat (limited to 'move')
-rw-r--r--move/move.pm11
1 files changed, 4 insertions, 7 deletions
diff --git a/move/move.pm b/move/move.pm
index 625a01ad8..accee6c1f 100644
--- a/move/move.pm
+++ b/move/move.pm
@@ -352,13 +352,10 @@ sub key_installfiles {
log::l("key_installfiles: installing config files in $sysconf");
mkdir $sysconf;
foreach (chomp_(cat_('/image/move/keyfiles'))) {
- my $target_dir = $sysconf . dirname($_);
- mkdir_p($target_dir);
- if (/\*$/) {
- run_program::run('cp', glob_($_), $target_dir);
- symlinkf("$sysconf$_", $_) foreach glob($_);
- } else {
- run_program::run('cp', $_, "$sysconf$_");
+ mkdir_p($sysconf . dirname($_));
+ my @l = /\*$/ ? glob_($_) : $_;
+ foreach (@l) {
+ eval { cp_f($_, "$sysconf$_") };
symlinkf("$sysconf$_", $_);
}
}