diff -Nru mountmedia-0.18ubuntu2/debian/changelog mountmedia-0.18ubuntu3/debian/changelog --- mountmedia-0.18ubuntu2/debian/changelog 2009-03-02 08:33:21.000000000 -0600 +++ mountmedia-0.18ubuntu3/debian/changelog 2009-03-11 23:44:31.000000000 -0500 @@ -1,3 +1,14 @@ +mountmedia (0.18ubuntu3) UNRELEASED; urgency=low + + * Split up calls for looking at driver disks and firmware disks + separately since they really should be treated separately. + * Add support for looking for Dell Driver Injection disks, which store + debs and udebs in $MNT/ubuntu/$(lsb_release -r -s). They're stored + in this location so that the same driver disk can support + multiple releases. (LP: #XXXXX) + + -- Mario Limonciello Fri, 06 Mar 2009 14:26:10 -0600 + mountmedia (0.18ubuntu2) jaunty; urgency=low * Actually change the di-utils versioned dependency. diff -Nru mountmedia-0.18ubuntu2/mountmedia mountmedia-0.18ubuntu3/mountmedia --- mountmedia-0.18ubuntu2/mountmedia 2009-03-02 08:29:05.000000000 -0600 +++ mountmedia-0.18ubuntu3/mountmedia 2009-03-11 23:46:23.000000000 -0500 @@ -5,6 +5,10 @@ WANTDRIVER=1 elif [ "$1" = floppy ]; then WANTFLOPPY=1 +elif [ "$1" = driver-injection-disk ]; then + WANTDRIVERINJECTIONDISK=1 +elif [ "$1" = want-firmware ]; then + WANTFIRMWARE=1 fi MNT=/media @@ -38,25 +42,30 @@ } checkcontents() { - dir="$1" - if [ "$WANTDRIVER" ]; then - # Make sure this is driver media by checking the files on - # it. Check for regular debs, udebs, and to be on the safe - # side, check for *.ude files (msdos file names...) - for filename in $dir/*.deb $dir/*.udeb $dir/*.ude \ - $dir/firmware/*.deb $dir/firmware/*.udeb $dir/firmware/*.ude; do - if [ -f "$filename" ]; then - return 0 # success - fi - done - # umount can legitimatly fail if something is keeping - # it open - umount $dir 2>/dev/null || true - return 1 + + [ "$WANTDRIVER" ] && dir=$1 + [ "$WANTFIRMWARE" ] && dir=$1/firmware + [ "WANTDRIVERINJECTIONDISK" ] && dir=$1/ubuntu/$(grep DISTRIB_RELEASE /etc/lsb-release | cut -d"=" -f2) + + if [ ! -z "$dir" ]; then + if [ -d "$dir" ]; then + # Make sure this is driver media by checking the files on + # it. Check for regular debs, udebs, and to be on the safe + # side, check for *.ude files (msdos file names...) + for filename in $dir/*.deb $dir/*.udeb $dir/*.ude; do + if [ -f "$filename" ]; then + return 0 # success + fi + done + fi else - return 0 + return 0 fi + # umount can legitimatly fail if something is keeping + # it open + umount $1 2>/dev/null || true + return 1 } if ! ( media_mounted && checkcontents $MNT ); then