Merge pull request #13 from insom/improved-migration
authorFlorian Forster <github@nospam.verplant.org>
Wed, 18 Jan 2012 11:01:04 +0000 (03:01 -0800)
committerFlorian Forster <github@nospam.verplant.org>
Wed, 18 Jan 2012 11:01:04 +0000 (03:01 -0800)
Migration: Ensure destination directories exist when moving RRDs

contrib/migrate-4-5.px

index 539eaa3..d3ff796 100755 (executable)
@@ -183,6 +183,7 @@ sub handle_file # {{{
     && (!$plugin_inst) && ($type_inst))
   {
     my $dir = join ('/', @path);
+    print "mkdir -p \"$dir/$plugin-$type_inst\"\n";
     print "mv \"$path\" \"$dir/$plugin-$type_inst/$type.rrd\"\n";
   }
 } # }}} sub handle_file