[vhffs-dev] [475] Added default value for backup file.

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 475
Author:   beuss
Date:     2007-02-17 12:42:15 +0000 (Sat, 17 Feb 2007)

Log Message:
-----------
Added default value for backup file.

Modified Paths:
--------------
    branches/vhffs_4.1/vhffs-compat/updatedb.pl


Modified: branches/vhffs_4.1/vhffs-compat/updatedb.pl
===================================================================
--- branches/vhffs_4.1/vhffs-compat/updatedb.pl	2007-02-17 12:36:23 UTC (rev 474)
+++ branches/vhffs_4.1/vhffs-compat/updatedb.pl	2007-02-17 12:42:15 UTC (rev 475)
@@ -121,9 +121,10 @@
 $ENV{'PGPASSFILE'} = $pgpass->filename;
 
 if(confirm('Do you want to perform a backup right now')) {
-    print 'Enter a filename for the backup file : ';
+    print 'Enter a filename for the backup file [/tmp/vhffs-backup.sql] : ';
     my $backupfile = <STDIN>;
     chomp($backupfile);
+    $backupfile = '/tmp/vhffs-backup.sql' unless($backupfile);
     my $bfh = new IO::File($backupfile, 'w');
     die("Unable to open $backupfile : $!\n") unless($bfh);
     my $pg_dump = new IO::File("pg_dump |");


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/