Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dracut modules: add breakpoints with more consistent names #1157

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@ do_upgrade() {
getargbool 0 enforcing || echo 0 > /sys/fs/selinux/enforce
fi

# NOTE: For debugging purposis. It's possible it will be changed in future.
getarg 'rd.upgrade.break=leapp-pre-upgrade' && {
emergency_shell -n upgrade "Break right before running leapp in initramfs"
}

# and off we go...
# NOTE: in case we would need to run leapp before pivot, we would need to
# specify where the root is, e.g. --root=/sysroot
Expand All @@ -237,9 +242,10 @@ do_upgrade() {
# NOTE: flush the cached content to disk to ensure everything is written
sync

#FIXME: for debugging purposes; this will be removed or redefined in future
getarg 'rd.upgrade.break=leapp-upgrade' 'rd.break=leapp-upgrade' && \
emergency_shell -n upgrade "Break after LEAPP upgrade stop"
# NOTE: For debugging purposes. It's possible it will be changed in future.
getarg 'rd.upgrade.break=leapp-post-upgrade' 'rd.upgrade.break=leapp-upgrade' 'rd.break=leapp-upgrade' && {
emergency_shell -n upgrade "Break right after LEAPP upgrade, before post-upgrade leapp run"
}

if [ "$rv" -eq 0 ]; then
# run leapp to proceed phases after the upgrade with Python3
Expand Down Expand Up @@ -370,8 +376,10 @@ result=$?
##### safe the data and remount $NEWROOT as it was previously mounted #####
save_journal

#FIXME: for debugging purposes; this will be removed or redefined in future
getarg 'rd.break=leapp-logs' && emergency_shell -n upgrade "Break after LEAPP save_journal"
# NOTE: For debugging purposis. It's possible it will be changed in future.
getarg 'rd.break=leapp-logs' 'rd.upgrade.break=leapp-finish' && {
emergency_shell -n upgrade "Break after LEAPP save_journal (upgrade initramfs end)"
}

# NOTE: flush the cached content to disk to ensure everything is written
sync
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh

source_conf /etc/conf.d

getarg 'rd.upgrade.break=upgrade' 'rd.break=upgrade' && \
emergency_shell -n upgrade "Break before upgrade"
# NOTE: For debugging purposis. It's possible it will be changed in future.
getarg 'rd.upgrade.break=upgrade' 'rd.break=upgrade' 'rd.upgrade.break=leapp-initram' && \
emergency_shell -n upgrade "Break right after getting to leapp dracut modules"

setstate() {
export UPGRADE_STATE="$*"
Expand Down
Loading