summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-08-28 14:54:38 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-08-28 14:54:38 +0000
commit1db5d687d0039edeba825c650583f8f4fece6f2f (patch)
tree4c425bbcf68bd17a2cd882f9a0d8267696028773
parent4bf70375459a272ee50c0f0fd19112f7ba0de04d (diff)
downloaddrakx-backup-do-not-use-1db5d687d0039edeba825c650583f8f4fece6f2f.tar
drakx-backup-do-not-use-1db5d687d0039edeba825c650583f8f4fece6f2f.tar.gz
drakx-backup-do-not-use-1db5d687d0039edeba825c650583f8f4fece6f2f.tar.bz2
drakx-backup-do-not-use-1db5d687d0039edeba825c650583f8f4fece6f2f.tar.xz
drakx-backup-do-not-use-1db5d687d0039edeba825c650583f8f4fece6f2f.zip
use mkdir_p instead of mkdir
-rw-r--r--perl-install/detect_devices.pm2
-rw-r--r--perl-install/devices.pm2
-rw-r--r--perl-install/fs.pm4
-rw-r--r--perl-install/install_any.pm4
-rw-r--r--perl-install/loopback.pm4
5 files changed, 8 insertions, 8 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index f7522f79c..e8b728b6e 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -610,7 +610,7 @@ sub probeSerialDevices {
#- for device already probed, we can safely (assuming device are
#- not moved during install :-)
#- include /dev/mouse device if using an X server.
- -d "/var/lock" or mkdir "/var/lock", 0755;
+ mkdir_p("/var/lock");
-l "/dev/mouse" and $serialprobe{"/dev/" . readlink "/dev/mouse"} = undef;
foreach (keys %serialprobe) { m|^/dev/(.*)| and touch "/var/lock/LCK..$1" }
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index d9263eb52..7fd8a8990 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -175,7 +175,7 @@ sub make($) {
}
#- make a directory for this inode if needed.
- mkdir dirname($file), 0755;
+ mkdir_p(dirname($file));
syscall_('mknod', $file, $type | 0600, makedev($major, $minor)) or die "mknod failed (dev $_): $!";
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 4d94586cd..d1d6887d7 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -208,7 +208,7 @@ sub prepare_write_fstab {
part2device($prefix, $_->{device}, $_->{type});
my $real_mntpoint = $_->{mntpoint} || ${{ '/tmp/hdimage' => '/mnt/hd' }}{$_->{real_mntpoint}};
- mkdir_p("$prefix$real_mntpoint", 0755) if $real_mntpoint =~ m|^/|;
+ mkdir_p("$prefix$real_mntpoint") if $real_mntpoint =~ m|^/|;
my $mntpoint = loopback::carryRootLoopback($_) ? '/initrd/loopfs' : $real_mntpoint;
my ($freq, $passno) =
@@ -854,7 +854,7 @@ sub df {
} elsif ($part->{notFormatted} && !$part->{isFormatted}) {
return; #- won't even try!
} else {
- mkdir $dir;
+ mkdir_p($dir);
eval { mount($part->{device}, $dir, type2fs($part), 'readonly') };
if ($@) {
$part->{notFormatted} = 1;
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 85ce06463..05939b2a8 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -487,7 +487,7 @@ sub setAuthentication {
}
write_smb_conf($domain);
run_program::rooted($o->{prefix}, "chkconfig", "--level", "35", "winbind", "on");
- mkdir "$o->{prefix}/home/$domain", 0755;
+ mkdir_p("$o->{prefix}/home/$domain");
#- defer running smbpassword - no network yet
$winbind = $winbind . "%" . $winpass;
@@ -779,7 +779,7 @@ sub getAndSaveAutoInstallFloppy {
if (arch() =~ /sparc/) {
my $imagefile = "$o->{prefix}/tmp/autoinst.img";
- my $mountdir = "$o->{prefix}/tmp/mount"; -d $mountdir or mkdir $mountdir, 0755;
+ my $mountdir = "$o->{prefix}/tmp/mount"; mkdir_p($mountdir);
my $workdir = "$o->{prefix}/tmp/work"; -d $workdir or rmdir $workdir;
getAndSaveInstallFloppy($o, $imagefile) or return;
diff --git a/perl-install/loopback.pm b/perl-install/loopback.pm
index 817038e36..6129e6c6d 100644
--- a/perl-install/loopback.pm
+++ b/perl-install/loopback.pm
@@ -56,7 +56,7 @@ sub carryRootCreateSymlink {
symlink "/initrd/loopfs/lnx4win/boot", "$prefix/boot";
}
#- indicate kernel to keep initrd
- mkdir "$prefix/initrd", 0755;
+ mkdir_p("$prefix/initrd");
}
@@ -108,7 +108,7 @@ sub verifFile {
sub prepare_boot {
my $r = readlink "$::prefix/boot";
unlink "$::prefix/boot";
- mkdir "$::prefix/boot", 0755;
+ mkdir_p("$::prefix/boot");
[$r, $::prefix];
}