summaryrefslogtreecommitdiffstats
path: root/draksnapshot-config
diff options
context:
space:
mode:
Diffstat (limited to 'draksnapshot-config')
-rwxr-xr-xdraksnapshot-config9
1 files changed, 8 insertions, 1 deletions
diff --git a/draksnapshot-config b/draksnapshot-config
index 149cf74..b12d8dc 100755
--- a/draksnapshot-config
+++ b/draksnapshot-config
@@ -26,6 +26,7 @@ use standalone; #- warning, standalone must be loaded very first, for 'expla
use common;
use interactive;
use MDV::Snapshot::Common;
+use MDV::Snapshot::Hal;
# i18n: IMPORTANT: to get correct namespace (drakconf instead of libDrakX)
BEGIN { unshift @::textdomains, 'draksnapshot' }
@@ -102,7 +103,13 @@ my %interval_titles = (
my (%entries, $where);
# if not configured, just default where will be mounted the discs by HAL:
-$backup_directory ||= '/media/';
+if (!$backup_directory || $::testing) {
+ my $dbus = get_system_bus();
+ if ($dbus) {
+ my @discs = map { $_->GetProperty('volume.mount_point') } find_removable_volumes($dbus);
+ $backup_directory = $discs[0];
+ }
+}
my $dialog = ugtk2->new(N("Backup snapshots configuration"));
my $d_window = $dialog->{window};