diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-01-26 11:27:58 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-01-26 11:27:58 +0100 |
commit | ff1e4b0626d8ce567492ccadbd30dfc32d4c15f1 (patch) | |
tree | bcc69dfac4fbf2c7ffc4b903214f6f88b15dfbdc | |
parent | bf783d9044cb5c9e851fbf10c9bb7e6192b13afd (diff) |
add new "Acquire::cdrom::AutoDetect" variable that enables/disables
the dlopen of libudev for automatic cdrom detection
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | doc/examples/configure-index | 4 | ||||
-rw-r--r-- | methods/cdrom.cc | 3 |
3 files changed, 8 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index b499d7298..7e38cda99 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,8 @@ apt (0.7.25.1) UNRELEASED; urgency=low the umount again * methods/cdrom.cc: - fixes in multi cdrom setup code + - add new "Acquire::cdrom::AutoDetect" variable that enables/disables + the dlopen of libudev for automatic cdrom detection -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 18 Dec 2009 16:54:18 +0100 diff --git a/doc/examples/configure-index b/doc/examples/configure-index index 1e9946e1b..317acddf6 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -250,6 +250,10 @@ Acquire cdrom { + // do auto detection of the cdrom mountpoint + AutoDetect "true"; + + // cdrom mountpoint (needs to be defined in fstab if AutoDetect is not used) mount "/cdrom"; // You need the trailing slash! diff --git a/methods/cdrom.cc b/methods/cdrom.cc index 763547013..87794b052 100644 --- a/methods/cdrom.cc +++ b/methods/cdrom.cc @@ -218,6 +218,7 @@ bool CDROMMethod::Fetch(FetchItem *Itm) return true; } + bool AutoDetect = _config->FindB("Acquire::cdrom::AutoDetect", true); CDROM = _config->FindDir("Acquire::cdrom::mount","/cdrom/"); if (Debug) clog << "Looking for CDROM at " << CDROM << endl; @@ -228,7 +229,7 @@ bool CDROMMethod::Fetch(FetchItem *Itm) string NewID; while (CurrentID.empty() == true) { - if (CDROM == "apt-udev-auto/") + if (AutoDetect) AutoDetectAndMount(Get, NewID); if(!IsMounted(CDROM)) |