[PATCH] driver-updates: accept burned driver discs (#1073719)

Vratislav Podzimek vpodzime at redhat.com
Tue Mar 11 07:53:43 UTC 2014


On Tue, 2014-03-11 at 00:05 -0400, Will Woods wrote:
> driver-updates was written with the assumption that the interactive menu
> would always involve choosing a device which contained multiple updates
> images.
> 
> This is not really the case - that's not how it worked in RHEL6, for
> example - so we need to handle the case where the selected device is
> itself a driver update disc.
> 
> This patch just checks the chosen device - if it is, in fact, a driver
> update disc, then we unmount it (so the later functions can re-mount
> it).
> 
> Leaving the mountpoint as None is valid, as our umount() will simply
> ignore that.
> 
> Bonus: remove a debugging "print" statement that was never supposed to
> be there. MY BAD Y'ALL.
> 
> Resolves: rhbz#1073719
> ---
>  dracut/driver-updates | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/dracut/driver-updates b/dracut/driver-updates
> index 4701adc..9c19140 100755
> --- a/dracut/driver-updates
> +++ b/dracut/driver-updates
> @@ -672,7 +672,6 @@ def select_iso():
>          iso_dev = selection_menu(devices,
>                                   "Driver disk device selection\n" + header,
>                                   str, multi_choice=False, refresh=True)
> -        print iso_dev
>  
>      if not iso_dev:
>          return (None, None)
> @@ -684,6 +683,12 @@ def select_iso():
>          print("===Cannot mount the chosen device!===\n")
>          return select_iso()
>  
> +    # is this device a Driver Update Disc?
> +    if is_dd(mnt):
> +        umount(mnt) # BLUH. unmount it first so select_dd can mount it OK
> +        return (iso_dev.device, None)
> +
> +    # maybe it's a device containing multiple DUDs - let the user pick one
>      isos = list()
>      for dir_path, _dirs, files in os.walk(mnt):
>          # trim the mount point path
ACK.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list