summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@99302b65-d5f7-0310-b3dd-f8cd6f4e3d94>2008-09-29 16:35:42 +0000
committertv <tv@99302b65-d5f7-0310-b3dd-f8cd6f4e3d94>2008-09-29 16:35:42 +0000
commit54b47925aff2dba0493140c6d90b84bc0c525bac (patch)
tree706939e7031ac607eed45b8378736b3e3e2a9e10
parent14a77c8a9b720715e463b08d8fa9ecd588e0787b (diff)
downloaddraksnapshot-54b47925aff2dba0493140c6d90b84bc0c525bac.tar
draksnapshot-54b47925aff2dba0493140c6d90b84bc0c525bac.tar.gz
draksnapshot-54b47925aff2dba0493140c6d90b84bc0c525bac.tar.bz2
draksnapshot-54b47925aff2dba0493140c6d90b84bc0c525bac.tar.xz
draksnapshot-54b47925aff2dba0493140c6d90b84bc0c525bac.zip
default to HAL mounted disc path (#39802)
git-svn-id: http://svn.mandriva.com/svn/soft/draksnapshot/trunk@247031 99302b65-d5f7-0310-b3dd-f8cd6f4e3d94
-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};