pf-tools commit: r892 [parmelan-guest] - in /branches/next-gen/tools: pflaunch umlaunch xenlaunch
parmelan-guest at users.alioth.debian.org
parmelan-guest at users.alioth.debian.org
Tue Sep 7 14:36:56 UTC 2010
Author: parmelan-guest
Date: Tue Sep 7 14:36:54 2010
New Revision: 892
URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=892
Log:
More mkdir -> make_path
Modified:
branches/next-gen/tools/pflaunch (contents, props changed)
branches/next-gen/tools/umlaunch (contents, props changed)
branches/next-gen/tools/xenlaunch (contents, props changed)
Modified: branches/next-gen/tools/pflaunch
URL: http://svn.debian.org/wsvn/pf-tools/branches/next-gen/tools/pflaunch?rev=892&op=diff
==============================================================================
--- branches/next-gen/tools/pflaunch (original)
+++ branches/next-gen/tools/pflaunch Tue Sep 7 14:36:54 2010
@@ -33,6 +33,7 @@
use English qw( -no_match_vars ); # Avoids regex performance penalty
use Expect;
+use File::Path qw( make_path );
use File::Temp;
use Getopt::Long;
use Net::IP;
@@ -1905,8 +1906,7 @@
. "flag '--nocvsupdate' !" );
}
-mkdir($PF_STATUS_DIR) unless ( -d $PF_STATUS_DIR );
-mkdir( $PF_STATUS_DIR . "/bridge" ) unless ( -d $PF_STATUS_DIR . "/bridge" );
+make_path("$PF_STATUS_DIR/bridge");
__Fault("uml_switch est il lancé ? (Paquage uml-utilities)")
unless ( -S $uml_switch_pipe );
Modified: branches/next-gen/tools/umlaunch
URL: http://svn.debian.org/wsvn/pf-tools/branches/next-gen/tools/umlaunch?rev=892&op=diff
==============================================================================
--- branches/next-gen/tools/umlaunch (original)
+++ branches/next-gen/tools/umlaunch Tue Sep 7 14:36:54 2010
@@ -27,6 +27,8 @@
use warnings;
use English qw( -no_match_vars ); # Avoids regex performance penalty
+use File::Basename;
+use File::Path qw( make_path );
use Getopt::Long;
use Socket;
@@ -156,7 +158,7 @@
if ( !-f $disk0 ) {
print STDERR "Cannot find disk $disk0, creating empty one\n";
- system("mkdir -p -m 750 `dirname $disk0`");
+ make_path( dirname($disk0), { mask => 0750 } );
system("dd if=/dev/zero of=$disk0 seek=$disksize count=0 bs=1M");
}
Modified: branches/next-gen/tools/xenlaunch
URL: http://svn.debian.org/wsvn/pf-tools/branches/next-gen/tools/xenlaunch?rev=892&op=diff
==============================================================================
--- branches/next-gen/tools/xenlaunch (original)
+++ branches/next-gen/tools/xenlaunch Tue Sep 7 14:36:54 2010
@@ -23,6 +23,7 @@
use Data::Dumper;
use English qw( -no_match_vars ); # Avoids regex performance penalty
+use File::Path qw( make_path );
use Getopt::Long;
use Sitalibs::Config;
@@ -246,11 +247,7 @@
print "brname : `$brname'\n";
# disks
-unless ( -d $DISKDIR . "/" . $vm ) {
- `mkdir -p $DISKDIR/$vm`;
- die "Probleme lors de la cration du dossier " . $DISKDIR . "/" . $vm
- if ($CHILD_ERROR);
-}
+make_path("$DISKDIR/$vm");
unless ( -f $DISKDIR . "/" . $vm . "/swap.img" ) {
print "Creation du l'image swap\n";
system(
More information about the pf-tools-commits
mailing list