Commit 5d016ef added support for doing cdrom-swapping while doing "inst.ks=cdrom[:...]". But it turns out that if you're slow to swap the discs, we'll hit dracut's retry timeout and it'll drop to the emergency shell.
So, in response to User Requests, we now disable the timeout entirely when using "inst.ks=cdrom[:...]"; dracut will wait forever for the kickstart and/or installer media, and if anything goes wrong you're just stuck and you'll need to reset.
Resolves: rhbz#1168902
From: Adam Williamson awilliam@redhat.com
This should get back the console on tty2. --- data/systemd/anaconda.target | 1 + 1 file changed, 1 insertion(+)
diff --git a/data/systemd/anaconda.target b/data/systemd/anaconda.target index e160da6..a8e4be5 100644 --- a/data/systemd/anaconda.target +++ b/data/systemd/anaconda.target @@ -11,3 +11,4 @@ Wants=plymouth-quit.service plymouth-quit-wait.service Wants=anaconda-direct.service anaconda.service Wants=anaconda-sshd.service Wants=zram.service +Wants=systemd-logind.service
From: Jiri Konecny jkonecny@redhat.com
In SourceSpoke before this patch InpuChecks reads information from GtkWidgets which means only selected repository could be tested. This is problematic in some circumstances for example when we want to run tests in on_back_clicked method. --- pyanaconda/ui/gui/spokes/source.py | 75 ++++++++++++++++++++++++++++---------- 1 file changed, 56 insertions(+), 19 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py index 856ab79..624b077 100644 --- a/pyanaconda/ui/gui/spokes/source.py +++ b/pyanaconda/ui/gui/spokes/source.py @@ -27,6 +27,7 @@
import os, signal, re from collections import namedtuple +from urllib.parse import urlsplit
import gi gi.require_version("GLib", "2.0") @@ -950,36 +951,62 @@ def _sanitize_model(self, model):
# This method is shared by the checks on urlEntry and repoUrlEntry def _checkURL(self, inputcheck, combo): - url_string = self.get_input(inputcheck.input_obj).strip() + # If combo is not set inputcheck holds repo + is_additional_repo = combo is None + if is_additional_repo: + # Input object contains repository name + repo = self._get_repo_by_name(inputcheck.input_obj) + protocol = urlsplit(repo.baseurl)[0] + url_string = repo.baseurl.strip()[len(protocol) + 3:] + else: + url_string = self.get_input(inputcheck.input_obj).strip() + protocol = combo.get_active_id()
# If this is HTTP/HTTPS/FTP, use the URL_PARSE regex - combo_protocol = combo.get_active_id() - if combo_protocol in (PROTOCOL_HTTP, PROTOCOL_HTTPS, PROTOCOL_FTP): + if protocol in (PROTOCOL_HTTP, PROTOCOL_HTTPS, PROTOCOL_FTP): if not url_string: - return _("URL is empty") + if is_additional_repo and repo.name: + return _("Repository %s has empty url") % repo.name + else: + return _("URL is empty")
m = URL_PARSE.match(url_string) if not m: - return _("Invalid URL") + if is_additional_repo and repo.name: + return _("Repository %s has invalid url") % repo.name + else: + return _("Invalid URL")
# Matching protocols in the URL should already have been removed # by _removeUrlPrefix. If there's still one there, it's wrong. url_protocol = m.group('protocol') if url_protocol: - return _("Protocol in URL does not match selected protocol") - elif combo_protocol == PROTOCOL_NFS: + if is_additional_repo and repo.name: + return _("Repository %s does not match selected protocol") % repo.name + else: + return _("Protocol in URL does not match selected protocol") + elif protocol == PROTOCOL_NFS: if not url_string: - return _("NFS server is empty") + if is_additional_repo and repo.name: + return _("Repository %s has empty NFS server") % repo.name + else: + return _("NFS server is empty")
# Make sure the part before the colon looks like a hostname, # and that the path is not empty host, _colon, path = url_string.partition(':')
if not re.match('^' + HOSTNAME_PATTERN_WITHOUT_ANCHORS + '$', host): - return _("Invalid host name") + if is_additional_repo and repo.name: + return _("Repository %s has invalid host name") % repo.name + else: + return _("Invalid host name")
if not path: - return _("Remote directory is required") + if is_additional_repo and repo.name: + return _("Repository %s required remote directory") % repo.name + else: + return _("Remote directory is required")
return InputCheck.CHECK_OK
@@ -987,7 +1014,7 @@ def _checkURLEntry(self, inputcheck): return self._checkURL(inputcheck, self._protocolComboBox)
def _checkRepoURL(self, inputcheck): - return self._checkURL(inputcheck, self._repoProtocolComboBox) + return self._checkURL(inputcheck, None)
# Update the check on urlEntry when the sensitity or selected protocol changes def _updateURLEntryCheck(self, *args): @@ -1004,7 +1031,8 @@ def _checkDuplicateRepos(self, inputcheck): return InputCheck.CHECK_OK
def _checkRepoName(self, inputcheck): - repo_name = self.get_input(inputcheck.input_obj).strip() + # Input object is name of the repository + repo_name = inputcheck.input_obj
if not repo_name: return _("Empty repository name") @@ -1021,19 +1049,21 @@ def _checkRepoName(self, inputcheck): return InputCheck.CHECK_OK
def _checkRepoProxy(self, inputcheck): + # Input object contains repo name + repo = self._get_repo_by_name(inputcheck.input_obj) # If nfs is selected as the protocol, skip the proxy check - if self._repoProtocolComboBox.get_active_id() == PROTOCOL_NFS: + if repo.baseurl.startswith(PROTOCOL_NFS): return InputCheck.CHECK_OK
- # Empty proxies are OK, as long as the username and password are empty too - proxy_string = self.get_input(inputcheck.input_obj).strip() - username_set = self._repoProxyUsernameEntry.is_sensitive() and self._repoProxyUsernameEntry.get_text().strip() - password_set = self._repoProxyPasswordEntry.is_sensitive() and self._repoProxyPasswordEntry.get_text().strip() + if not repo.proxy: + return InputCheck.CHECK_OK
- if not (proxy_string or username_set or password_set): + # Empty proxies are OK, as long as the username and password are empty too + proxy_obj = ProxyString(repo.proxy) + if not (repo.proxy or proxy_obj.username or proxy_obj.password): return InputCheck.CHECK_OK
- return _validateProxy(proxy_string, username_set, password_set) + return _validateProxy(proxy_obj.noauth_url, proxy_obj.username, proxy_obj.password)
# Signal handlers. def on_source_toggled(self, button, relatedBox): @@ -1270,6 +1300,13 @@ def _unique_repo_name(self, name): highest_index = max(matches) if matches else 0 return name + ("_%d" % (highest_index + 1))
+ def _get_repo_by_name(self, name): + """ Return a repository by given name""" + for repo in self._repoStore: + if repo.name == name: + return repo + return None + def on_repoSelection_changed(self, *args): """ Called when the selection changed.
From: Jiri Konecny jkonecny@redhat.com
Iterate all repositories at on_back_clicked and check for url so user gets warning about bad url before leaving the spoke. And one small line wrap. --- pyanaconda/ui/gui/spokes/source.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py index 8fc1749..67bb344 100644 --- a/pyanaconda/ui/gui/spokes/source.py +++ b/pyanaconda/ui/gui/spokes/source.py @@ -627,7 +627,8 @@ def _grabObjects(self): # Call InputCheckHandler directly since this check operates on rows of a TreeModel # instead of GtkEntry inputs. Updating the check is handled by the signal handlers # connected to repoStore. - self._duplicateRepoCheck = InputCheckHandler.add_check(self, self._repoStore, self._checkDuplicateRepos) + self._duplicateRepoCheck = InputCheckHandler.add_check(self, self._repoStore, + self._checkDuplicateRepos)
# Create a dictionary for the checks on fields in individual repos # These checks will be added and removed as repos are added and removed from repoStore @@ -1080,6 +1081,10 @@ def on_back_clicked(self, button): """If any input validation checks failed, keep the user on the screen. Otherwise, do the usual thing."""
+ # Check repositories on bad url + for repo in self._repoStore: + self._repoChecks[repo[REPO_OBJ].repo_id].url_check.update_check_status() + failed_check = next(self.failed_checks, None)
# If the failed check is the duplicate repo check, focus the repo TreeView
From: Jiri Konecny jkonecny@redhat.com
ProxyString object for parsing proxy was misused. When using proxy with username the password is need too and reverse. --- pyanaconda/ui/gui/spokes/source.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py index 67bb344..fe423ea 100644 --- a/pyanaconda/ui/gui/spokes/source.py +++ b/pyanaconda/ui/gui/spokes/source.py @@ -1545,7 +1545,10 @@ def on_repoProxy_changed(self, *args): self._repoChecks[repo.repo_id].proxy_check.update_check_status()
try: - proxy = ProxyString(url=url, username=username, password=password) + if username and password: + proxy = ProxyString(url=url, username=username, password=password) + else: + proxy = ProxyString(url=url) repo.proxy = proxy.url except ProxyStringError as e: log.error("Failed to parse proxy - %s:%s@%s: %s", username, password, url, e)
From: Jiri Konecny jkonecny@redhat.com
Choose to use identifiers for the repositories because I have found nothing which wasn't changing in time. This seems to fix most of the problems with the Source spoke. Add generator for IDs to iutil.py this could be helpful for future. --- pyanaconda/iutil.py | 11 +++++++ pyanaconda/kickstart.py | 1 + pyanaconda/ui/gui/spokes/source.py | 62 ++++++++++++++++++++++---------------- 3 files changed, 48 insertions(+), 26 deletions(-)
diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py index 8e9592b..07fc4cb 100644 --- a/pyanaconda/iutil.py +++ b/pyanaconda/iutil.py @@ -1334,3 +1334,14 @@ def _opener(path, open_flags): return eintr_retry_call(os.open, path, open_flags, perm)
return open(path, mode, opener=_opener, **kwargs) + +def id_generator(): + """ Id numbers generator. + Generating numbers from 0 to X and increments after every call. + + :returns: Generator which gives you unique numbers. + """ + actual_id = 0 + while(True): + yield actual_id + actual_id += 1 diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py index 7f9a0e0..13a729a 100644 --- a/pyanaconda/kickstart.py +++ b/pyanaconda/kickstart.py @@ -1581,6 +1581,7 @@ def __init__(self, *args, **kwargs): :type enabled: bool """ self.enabled = kwargs.pop("enabled", True) + self.repo_id = kwargs.pop("repo_id", None)
commands.repo.F21_RepoData.__init__(self, *args, **kwargs)
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py index 624b077..8fc1749 100644 --- a/pyanaconda/ui/gui/spokes/source.py +++ b/pyanaconda/ui/gui/spokes/source.py @@ -52,6 +52,7 @@ from pyanaconda.regexes import REPO_NAME_VALID, URL_PARSE, HOSTNAME_PATTERN_WITHOUT_ANCHORS from pyanaconda import constants from pyanaconda import nm +from pyanaconda.iutil import id_generator
from blivet.util import get_mount_device, get_mount_paths
@@ -394,6 +395,7 @@ def __init__(self, *args, **kwargs): self._proxyUrl = "" self._proxyChange = False self._cdrom = None + self._repo_counter = id_generator()
self._repoChecks = {}
@@ -955,7 +957,7 @@ def _checkURL(self, inputcheck, combo): is_additional_repo = combo is None if is_additional_repo: # Input object contains repository name - repo = self._get_repo_by_name(inputcheck.input_obj) + repo = self._get_repo_by_id(inputcheck.input_obj) protocol = urlsplit(repo.baseurl)[0] url_string = repo.baseurl.strip()[len(protocol) + 3:] else: @@ -1032,7 +1034,7 @@ def _checkDuplicateRepos(self, inputcheck):
def _checkRepoName(self, inputcheck): # Input object is name of the repository - repo_name = inputcheck.input_obj + repo_name = self._get_repo_by_id(inputcheck.input_obj).name
if not repo_name: return _("Empty repository name") @@ -1050,7 +1052,7 @@ def _checkRepoName(self, inputcheck):
def _checkRepoProxy(self, inputcheck): # Input object contains repo name - repo = self._get_repo_by_name(inputcheck.input_obj) + repo = self._get_repo_by_id(inputcheck.input_obj) # If nfs is selected as the protocol, skip the proxy check if repo.baseurl.startswith(PROTOCOL_NFS): return InputCheck.CHECK_OK @@ -1243,6 +1245,8 @@ def _reset_repoStore(self): If the list has no element, clear the repo entry fields. """
+ log.debug("Clearing checks in source spoke") + # Remove the repo checks for checks in self._repoChecks.values(): self.remove_check(checks.name_check) @@ -1262,6 +1266,8 @@ def _reset_repoStore(self): enabled=repo.enabled) # Track the original name, user may change .name ks_repo.orig_name = name + # Add addon repository id for identification + ks_repo.repo_id = next(self._repo_counter) self._repoStore.append([self.payload.isRepoEnabled(name), ks_repo.name, ks_repo]) @@ -1300,11 +1306,12 @@ def _unique_repo_name(self, name): highest_index = max(matches) if matches else 0 return name + ("_%d" % (highest_index + 1))
- def _get_repo_by_name(self, name): - """ Return a repository by given name""" + def _get_repo_by_id(self, repo_id): + """ Return a repository by given name + """ for repo in self._repoStore: - if repo.name == name: - return repo + if repo[REPO_OBJ].repo_id == repo_id: + return repo[REPO_OBJ] return None
def on_repoSelection_changed(self, *args): @@ -1428,6 +1435,8 @@ def on_addRepo_clicked(self, button): repo = self.data.RepoData(name=name) repo.ks_repo = True repo.orig_name = "" + # Set addon repo id and increment counter + repo.repo_id = next(self._repo_counter)
itr = self._repoStore.append([True, repo.name, repo]) self._repoSelection.select_iter(itr) @@ -1442,10 +1451,10 @@ def on_removeRepo_clicked(self, button):
# Remove the input validation checks for this repo repo = self._repoStore[itr][REPO_OBJ] - self.remove_check(self._repoChecks[repo.name].name_check) - self.remove_check(self._repoChecks[repo.name].url_check) - self.remove_check(self._repoChecks[repo.name].proxy_check) - del self._repoChecks[repo.name] + self.remove_check(self._repoChecks[repo.repo_id].name_check) + self.remove_check(self._repoChecks[repo.repo_id].url_check) + self.remove_check(self._repoChecks[repo.repo_id].proxy_check) + del self._repoChecks[repo.repo_id]
self._repoStore.remove(itr) if len(self._repoStore) == 0: @@ -1466,17 +1475,12 @@ def on_repoNameEntry_changed(self, entry): repo = self._repoStore[itr][REPO_OBJ] name = self._repoNameEntry.get_text().strip()
- old_name = repo.name - if name == old_name: - # nothing changed - return - repo.name = name self._repoStore.set_value(itr, REPO_NAME_COL, name) - - self._repoChecks[name] = self._repoChecks[old_name] - del self._repoChecks[old_name] - self._repoChecks[name].name_check.update_check_status() + # do not update check status if check are not yet set up + # (populationg/refreshing the spoke) + if repo.repo_id in self._repoChecks: + self._repoChecks[repo.repo_id].name_check.update_check_status()
def on_repoUrl_changed(self, editable, data=None): """ proxy url or protocol changed @@ -1493,7 +1497,10 @@ def on_repoUrl_changed(self, editable, data=None): else: repo.baseurl = proto + url
- self._repoChecks[repo.name].url_check.update_check_status() + # do not update check status if check are not yet set up + # (populationg/refreshing the spoke) + if repo.repo_id in self._repoChecks: + self._repoChecks[repo.repo_id].url_check.update_check_status()
# Check for and remove a URL prefix that matches the protocol dropdown self._removeUrlPrefix(editable, self._repoProtocolComboBox, self.on_repoUrl_changed) @@ -1530,7 +1537,7 @@ def on_repoProxy_changed(self, *args): # do not update check status if checks are not yet set up # (populating/refreshing the spoke) if repo.name in self._repoChecks: - self._repoChecks[repo.name].proxy_check.update_check_status() + self._repoChecks[repo.repo_id].proxy_check.update_check_status()
try: proxy = ProxyString(url=url, username=username, password=password) @@ -1560,13 +1567,16 @@ def on_repoStore_row_inserted(self, model, path, itr, user_data=None): # to this method is different from the iter used everywhere else, and is useless # once this method returns. Instead, create a TreeRowReference and work backwards # from that using paths any time we need to reference the store. - self._repoChecks[repo.name] = RepoChecks(InputCheckHandler.add_check(self, self._repoNameEntry, + self._repoChecks[repo.repo_id] = RepoChecks(InputCheckHandler.add_check(self, + repo.repo_id, self._checkRepoName, Gtk.TreeRowReference.new(model, path)), - InputCheckHandler.add_check(self, self._repoUrlEntry, + InputCheckHandler.add_check(self, + repo.repo_id, self._checkRepoURL, Gtk.TreeRowReference.new(model, path)), - InputCheckHandler.add_check(self, self._repoProxyUrlEntry, + InputCheckHandler.add_check(self, + repo.repo_id, self._checkRepoProxy, Gtk.TreeRowReference.new(model, path)))
@@ -1582,7 +1592,7 @@ def on_repoProtocolComboBox_changed(self, combobox, user_data=None): itr = self._repoSelection.get_selected()[1] if itr: repo = self._repoStore[itr][REPO_OBJ] - self._repoChecks[repo.name].proxy_check.update_check_status() + self._repoChecks[repo.repo_id].proxy_check.update_check_status()
# Run the URL entry handler too as it might be needed self._repoUrlEntry.emit("changed")
From: Jiri Konecny jkonecny@redhat.com
--- pyanaconda/ui/gui/spokes/source.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py index fe423ea..6aec801 100644 --- a/pyanaconda/ui/gui/spokes/source.py +++ b/pyanaconda/ui/gui/spokes/source.py @@ -959,8 +959,11 @@ def _checkURL(self, inputcheck, combo): if is_additional_repo: # Input object contains repository name repo = self._get_repo_by_id(inputcheck.input_obj) - protocol = urlsplit(repo.baseurl)[0] - url_string = repo.baseurl.strip()[len(protocol) + 3:] + protocol = urlsplit(repo.baseurl)[0] # extract protocol part (http, https, nfs...) + if repo.mirrorlist: + url_string = repo.mirrorlist.strip()[len(protocol) + 3:] # +3 for "://" part + else: + url_string = repo.baseurl.strip()[len(protocol) + 3:] # +3 for "://" part else: url_string = self.get_input(inputcheck.input_obj).strip() protocol = combo.get_active_id()
From: Will Woods wwoods@redhat.com
Commit 5d016ef added support for doing cdrom-swapping while doing "inst.ks=cdrom[:...]". But it turns out that if you're slow to swap the discs, we'll hit dracut's retry timeout and it'll drop to the emergency shell.
So, in response to User Requests, we now disable the timeout entirely when using "inst.ks=cdrom[:...]"; dracut will wait forever for the kickstart and/or installer media, and if anything goes wrong you're just stuck and you'll need to reset.
Resolves: rhbz#1168902 --- dracut/kickstart-genrules.sh | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dracut/kickstart-genrules.sh b/dracut/kickstart-genrules.sh index 3b83d6c1..7edfacd 100755 --- a/dracut/kickstart-genrules.sh +++ b/dracut/kickstart-genrules.sh @@ -19,6 +19,12 @@ case "${kickstart%%:*}" in when_diskdev_appears "$ksdev" \ fetch-kickstart-disk $env{DEVNAME} "$kspath" fi + # "cdrom:" also means "wait forever for kickstart" because rhbz#1168902 + if [ "$kstype" = "cdrom" ]; then + # if we reset main_loop to 0 every loop, we never hit the timeout. + # (see dracut's dracut-initqueue.sh for details on the mainloop) + echo "main_loop=0" > "$hookdir/initqueue/ks-cdrom-wait-forever.sh" + fi wait_for_kickstart ;; bd) # bd:<dev>:<path> - biospart (TODO... if anyone uses this anymore)
From: Chris Lumens clumens@redhat.com
We should have as much of the logic of how the CI tests are run in source control as possible, so that's what this target is for. Besides this, jenkins just runs a "git clean" first. --- Makefile.am | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am index b2cef40..dc88133 100644 --- a/Makefile.am +++ b/Makefile.am @@ -46,7 +46,7 @@ ZANATA_PULL_ARGS = --transdir $(srcdir)/po/ ZANATA_PUSH_ARGS = --srcdir $(srcdir)/po/ --push-type source --force
RC_RELEASE ?= $(shell date -u +0.1.%Y%m%d%H%M%S) -MOCKCHROOT ?= fedora-rawhide-x86_64 +MOCKCHROOT ?= fedora-rawhide-$(shell uname -m)
tag: @git tag -s -a -m "Tag as $(ARCHIVE_TAG)" $(ARCHIVE_TAG) @@ -153,3 +153,11 @@ runglade: GLADE_CATALOG_SEARCH_PATH=$(srcdir)/widgets/glade \ GLADE_MODULE_SEARCH_PATH=$(builddir)/widgets/src/.libs \ glade ${GLADE_FILE} + +ci: rc-release + $(MAKE) -C utils/dd + $(MAKE) TMPDIR=/var/tmp check + @mkdir -p repo + @mv *rpm repo + @createrepo -p repo + @sudo $(MAKE) TMPDIR=/var/tmp TESTS=install/run_install_test.sh TEST_ANACONDA_REPO=file://$(builddir)/repo/ check
From: Chris Lumens clumens@redhat.com
--- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am index dc88133..dc03e0c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -160,4 +160,4 @@ ci: rc-release @mkdir -p repo @mv *rpm repo @createrepo -p repo - @sudo $(MAKE) TMPDIR=/var/tmp TESTS=install/run_install_test.sh TEST_ANACONDA_REPO=file://$(builddir)/repo/ check + @sudo $(MAKE) TMPDIR=/var/tmp TESTS=install/run_install_test.sh TEST_ANACONDA_REPO=file://$(abs_builddir)/repo/ check
From: Will Woods wwoods@redhat.com
fetch-kickstart-disk and anaconda-diskroot are *executed*, not sourced, so they don't get the default dracut environment, so "$kickstart" isn't set, so "str_starts $kickstart cdrom" is always false, so the user never gets any of the "Please insert CDROM containing '$path'..." messages.
Set "$kickstart" from the boot args, and then this all works as expected.
Related: rhbz#1168902 --- dracut/anaconda-diskroot | 1 + dracut/fetch-kickstart-disk | 1 + 2 files changed, 2 insertions(+)
diff --git a/dracut/anaconda-diskroot b/dracut/anaconda-diskroot index 36fd49e..4ae7112 100755 --- a/dracut/anaconda-diskroot +++ b/dracut/anaconda-diskroot @@ -32,6 +32,7 @@ run_checkisomd5() {
dev="$1" path="$2" # optional, could be empty +kickstart="$(getarg ks= inst.ks=)"
[ -e "/dev/root" ] && exit 1 # we already have a root device!
diff --git a/dracut/fetch-kickstart-disk b/dracut/fetch-kickstart-disk index 37a1050..7eb769e 100755 --- a/dracut/fetch-kickstart-disk +++ b/dracut/fetch-kickstart-disk @@ -6,6 +6,7 @@ command -v getarg >/dev/null || . /lib/dracut-lib.sh
dev="$1" path="${2:-/ks.cfg}" +kickstart="$(getarg ks= inst.ks=)"
[ -e /tmp/ks.cfg.done ] && exit 1 [ -b "$dev" ] || exit 1
From: Will Woods wwoods@redhat.com
anaconda-lib has the `when_any_cdrom_appears` function for this exact purpose, so use that instead of handcrafting the udev rule. --- dracut/repo-genrules.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dracut/repo-genrules.sh b/dracut/repo-genrules.sh index 55abd32..9f1d40e 100755 --- a/dracut/repo-genrules.sh +++ b/dracut/repo-genrules.sh @@ -14,9 +14,8 @@ case "$root" in ;; anaconda-auto-cd) # special catch-all rule for CDROMs - echo 'ENV{ID_CDROM}=="1",' \ - 'RUN+="/sbin/initqueue --settled --onetime' \ - '/sbin/anaconda-diskroot $env{DEVNAME}"' >> $rulesfile + when_any_cdrom_appears \ + anaconda-diskroot $env{DEVNAME} # HACK: anaconda demands that CDROMs be mounted at /mnt/install/source ln -s repo /run/install/source ;;
Closed.
Hah whoops, I busted this up. Plus it needs a separate PR for RHEL7, as it turns out, because some stuff never got backported (or got lost in the rebase). So... closing this one.
anaconda-patches@lists.fedorahosted.org