Turns out that the symlinks all start with /dev/, but I've been adding that to the front of the symlink strings anyway so none of the comparisons work. While I'm at it, allow people to specify disks with or without the leading /dev/ in kickstart. --- kickstart.py | 3 +++ storage/udev.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/kickstart.py b/kickstart.py index 3578d11..fa06c48 100644 --- a/kickstart.py +++ b/kickstart.py @@ -166,6 +166,9 @@ def getEscrowCertificate(anaconda, url): return anaconda.storage.escrowCertificates[url] def deviceMatches(spec): + if not spec.startswith("/dev/"): + spec = "/dev/" + spec + matches = udev_resolve_glob(spec) dev = udev_resolve_devspec(spec) diff --git a/storage/udev.py b/storage/udev.py index 5faafa3..df961db 100644 --- a/storage/udev.py +++ b/storage/udev.py @@ -49,7 +49,7 @@ def udev_resolve_devspec(devspec): break else: for link in dev["symlinks"]: - if devspec == "/dev/" + link: + if devspec == link: ret = dev break @@ -71,7 +71,7 @@ def udev_resolve_glob(glob): ret.append(name) else: for link in dev["symlinks"]: - if fnmatch.fnmatch("/dev/" + link, glob): + if fnmatch.fnmatch(link, glob): ret.append(name) return ret -- 1.6.5.1 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list