summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rwxr-xr-xdraksnapshot-config9
2 files changed, 9 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 0824772..fa838a3 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@
thus not detecting some internal SATA discs (#41107)
- configurator:
o do not save config when clicking "Close" (#39790)
+ o default to HAL mounted disc path (#39802)
Version 0.14 - 26 September 2008, Thierry Vignaud
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};