summaryrefslogtreecommitdiffstats
path: root/move/move.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-04-19 15:02:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-04-19 15:02:11 +0000
commitefdd5965c477616be56b9f56a8613645ff2dac41 (patch)
tree70ad24cd2241eaa3055fb31eac58c0212a7252e1 /move/move.pm
parentb60585a154601978f6070123e50f6977c1d9fdf9 (diff)
downloaddrakx-backup-do-not-use-efdd5965c477616be56b9f56a8613645ff2dac41.tar
drakx-backup-do-not-use-efdd5965c477616be56b9f56a8613645ff2dac41.tar.gz
drakx-backup-do-not-use-efdd5965c477616be56b9f56a8613645ff2dac41.tar.bz2
drakx-backup-do-not-use-efdd5965c477616be56b9f56a8613645ff2dac41.tar.xz
drakx-backup-do-not-use-efdd5965c477616be56b9f56a8613645ff2dac41.zip
when creating directories, keep rights & uid & gid (esp. for armagetron)
Diffstat (limited to 'move/move.pm')
-rw-r--r--move/move.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/move/move.pm b/move/move.pm
index 56b495dcf..04105b6a0 100644
--- a/move/move.pm
+++ b/move/move.pm
@@ -140,7 +140,12 @@ sub init {
#- create remaining /etc and /var subdirectories if not already copied or symlinked,
#- because programs most often won't try to create the missing subdir before trying
#- to write a file, leading to obscure unexpected failures
- -d $_ or mkdir_p $_ foreach chomp_(cat_('/image/move/directories-to-create'));
+ foreach (cat_('/image/move/directories-to-create')) {
+ my ($mode, $uid, $gid, $name) = split;
+ next if -d $name;
+ mkdir($name, oct($mode));
+ chown($uid, $gid, $name);
+ }
chmod 01777, '/tmp', '/var/tmp'; #- /var/tmp -> badly needed for printing from OOo