Un-hardcode /tmp in zmupdate
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@3312 e3e1d417-86f3-4887-817a-d78f3d33393fpull/27/merge
parent
fe12ae4ee2
commit
755bd93a09
|
@ -339,7 +339,7 @@ if ( $version )
|
||||||
print( "Please ensure that ZoneMinder is stopped on your system prior to upgrading the database.\nPress enter to continue or ctrl-C to stop : " );
|
print( "Please ensure that ZoneMinder is stopped on your system prior to upgrading the database.\nPress enter to continue or ctrl-C to stop : " );
|
||||||
my $response = <STDIN>;
|
my $response = <STDIN>;
|
||||||
|
|
||||||
print( "\nDo you wish to take a backup of your database prior to upgrading?\nThis may result in a large file in /tmp if you have a lot of events.\nPress 'y' for a backup or 'n' to continue : " );
|
print( "\nDo you wish to take a backup of your database prior to upgrading?\nThis may result in a large file in @ZM_TMPDIR@ if you have a lot of events.\nPress 'y' for a backup or 'n' to continue : " );
|
||||||
$response = <STDIN>;
|
$response = <STDIN>;
|
||||||
chomp( $response );
|
chomp( $response );
|
||||||
while ( $response !~ /^[yYnN]$/ )
|
while ( $response !~ /^[yYnN]$/ )
|
||||||
|
@ -362,7 +362,7 @@ if ( $version )
|
||||||
$command .= " -p".$db_pass;
|
$command .= " -p".$db_pass;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
my $backup = "/tmp/".ZM_DB_NAME."-".$version.".dump";
|
my $backup = "@ZM_TMPDIR@/".ZM_DB_NAME."-".$version.".dump";
|
||||||
$command .= " --add-drop-table --databases ".ZM_DB_NAME." > ".$backup;
|
$command .= " --add-drop-table --databases ".ZM_DB_NAME." > ".$backup;
|
||||||
print( "Creating backup to $backup. This may take several minutes.\n" );
|
print( "Creating backup to $backup. This may take several minutes.\n" );
|
||||||
print( "Executing '$command'\n" ) if ( DBG_LEVEL > 0 );
|
print( "Executing '$command'\n" ) if ( DBG_LEVEL > 0 );
|
||||||
|
|
Loading…
Reference in New Issue