dracut-gencmdline: fix regex quoting in findstoragedriver()
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>
Thu, 29 Oct 2009 11:25:53 +0000 (11:25 +0000)
committerHarald Hoyer <harald@redhat.com>
Tue, 3 Nov 2009 16:47:38 +0000 (17:47 +0100)
commit13425eb243a80907e863d3a63fab11c2e7f0d720
tree1d61c5df433f33c190b6fe43a462972c907d5f87
parent5bde13f927935f6c480534d98c17966e46ed2845
dracut-gencmdline: fix regex quoting in findstoragedriver()

On my LVM system this changes the relevant output from "rd_NO_LVM" to
"rd_LVM_VG=alan-desktop.Linux"

Note that on my newer system, it now reaches moduledep() and complains.
I don't know enough awk to tell whose fault it is :).

    awk: line 2: function gensub never defined
    awk: line 2: function gensub never defined
    rd_NO_MD rd_NO_LVM rd_NO_LUKS LANG=en_GB.UTF-8 root=/dev/sda2

Both my systems (old ubuntu and debian unstable) agree that bash
regexes should not be quoted:

    $ [[ 'a' =~ a ]] && echo match
    match
    $ [[ 'a' =~ ^a$ ]] && echo match
    match
    $ [[ 'a' =~ '^a$' ]] && echo match
    $

(and yes, it is safe against globbing)

    $ touch 9
    $ echo [0-9]
    9
    $ [[ 1 =~ [0-9] ]] && echo match
    match
dracut-gencmdline