From ffee221b8d1df28768d30762d72a11289ae747dc Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 26 Jan 2010 21:08:41 +0100 Subject: add Dir::Media::MountPath config option --- cmdline/apt-cdrom.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc index 494a7d8df..988a58f20 100644 --- a/cmdline/apt-cdrom.cc +++ b/cmdline/apt-cdrom.cc @@ -120,11 +120,11 @@ bool AutoDetectCdrom(pkgUdevCdromDevices &UdevCdroms, unsigned int &i) _config->Set("Acquire::cdrom::mount", v[i].MountPath); _config->Set("APT::CDROM::NoMount", true); } else { - const char* AptMountPoint = "/media/apt"; + string AptMountPoint = _config->FindDir("Dir::Media::MountPath"); if (!FileExists(AptMountPoint)) - mkdir(AptMountPoint, 0750); + mkdir(AptMountPoint.c_str(), 0750); if(MountCdrom(AptMountPoint, v[i].DeviceName) == false) - _error->Warning(_("Failed to mount '%s' to '%s'"), v[i].DeviceName.c_str(), AptMountPoint); + _error->Warning(_("Failed to mount '%s' to '%s'"), v[i].DeviceName.c_str(), AptMountPoint.c_str()); _config->Set("Acquire::cdrom::mount", AptMountPoint); _config->Set("APT::CDROM::NoMount", true); } -- cgit v1.2.3