diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-06-23 03:07:58 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-06-23 03:07:58 +0000 |
commit | 953db332ce73dbfd40669d66bf23552dbd9c7838 (patch) | |
tree | 8b3d0cdd0790846e6ed833bd20f8e77d5080c0cc | |
parent | 9d596234ba111ec5899dacc466d30a6b612e4262 (diff) | |
download | drakx-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)
-rw-r--r-- | move/move.pm | 11 |
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$_", $_); } } |