Commit e002a751 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-release_upgrade: run __check_system (assure we still have systemd) after upgrade

parent 43f90339
#!/bin/sh #!/bin/sh
# #
# Copyright (C) 2013, 2016, 2017, 2019 Etersoft # Copyright (C) 2013, 2016, 2017, 2019, 2020 Etersoft
# Copyright (C) 2013, 2016, 2017, 2019 Vitaly Lipatov <lav@etersoft.ru> # Copyright (C) 2013, 2016, 2017, 2019, 2020 Vitaly Lipatov <lav@etersoft.ru>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by # it under the terms of the GNU Affero General Public License as published by
...@@ -179,8 +179,8 @@ __switch_repo_to() ...@@ -179,8 +179,8 @@ __switch_repo_to()
__check_system() __check_system()
{ {
# sure we have systemd if systemd is running # sure we have systemd if systemd is running
if is_installed systemd && is_active_systemd systemd ; then if is_active_systemd systemd ; then
docmd epm install systemd || fatal docmd epm --skip-installed install systemd || fatal
fi fi
} }
...@@ -243,8 +243,8 @@ __switch_alt_to_distro() ...@@ -243,8 +243,8 @@ __switch_alt_to_distro()
__switch_repo_to $TO __switch_repo_to $TO
__epm_ru_update || fatal __epm_ru_update || fatal
docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again" docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again"
__check_system
docmd epm upgrade || fatal "Check an error and run epm release-upgrade again" docmd epm upgrade || fatal "Check an error and run epm release-upgrade again"
__check_system
docmd epm update-kernel || fatal docmd epm update-kernel || fatal
info "Done." info "Done."
;; ;;
...@@ -254,8 +254,8 @@ __switch_alt_to_distro() ...@@ -254,8 +254,8 @@ __switch_alt_to_distro()
__switch_repo_to $TO __switch_repo_to $TO
__epm_ru_update || fatal __epm_ru_update || fatal
docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again" docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again"
__check_system
docmd epm upgrade || fatal "Check an error and run epm release-upgrade again" docmd epm upgrade || fatal "Check an error and run epm release-upgrade again"
__check_system
docmd epm update-kernel || fatal docmd epm update-kernel || fatal
info "Done." info "Done."
;; ;;
...@@ -265,13 +265,13 @@ __switch_alt_to_distro() ...@@ -265,13 +265,13 @@ __switch_alt_to_distro()
__switch_repo_to $TO __switch_repo_to $TO
__epm_ru_update || fatal __epm_ru_update || fatal
docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again" docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again"
__check_system
if epm installed libcrypt >/dev/null ; then if epm installed libcrypt >/dev/null ; then
# glibc-core coflicts libcrypt # glibc-core coflicts libcrypt
docmd epm downgrade apt pam pam0_passwdqc glibc-core libcrypt- || fatal docmd epm downgrade apt pam pam0_passwdqc glibc-core libcrypt- || fatal
fi fi
docmd epm downgrade docmd epm downgrade
docmd epm upgrade || fatal "Check an error and run epm release-upgrade again" docmd epm upgrade || fatal "Check an error and run epm release-upgrade again"
__check_system
docmd epm update-kernel || fatal docmd epm update-kernel || fatal
info "Done." info "Done."
;; ;;
...@@ -282,9 +282,9 @@ __switch_alt_to_distro() ...@@ -282,9 +282,9 @@ __switch_alt_to_distro()
docmd epm remove gdb || fatal docmd epm remove gdb || fatal
__switch_repo_to $TO __switch_repo_to $TO
__epm_ru_update || fatal __epm_ru_update || fatal
__check_system
docmd epm upgrade || fatal "Check an error and run epm release-upgrade again" docmd epm upgrade || fatal "Check an error and run epm release-upgrade again"
docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again" docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again"
__check_system
docmd epm update-kernel || fatal docmd epm update-kernel || fatal
info "Done." info "Done."
;; ;;
...@@ -294,12 +294,12 @@ __switch_alt_to_distro() ...@@ -294,12 +294,12 @@ __switch_alt_to_distro()
__switch_repo_to $TO __switch_repo_to $TO
__epm_ru_update || fatal __epm_ru_update || fatal
docmd epm downgrade rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again" docmd epm downgrade rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again"
__check_system
if epm installed libcrypt >/dev/null ; then if epm installed libcrypt >/dev/null ; then
# glibc-core coflicts libcrypt # glibc-core coflicts libcrypt
docmd epm downgrade apt rpm pam pam0_passwdqc glibc-core libcrypt- || fatal docmd epm downgrade apt rpm pam pam0_passwdqc glibc-core libcrypt- || fatal
fi fi
docmd epm downgrade docmd epm downgrade
__check_system
docmd epm upgrade || fatal docmd epm upgrade || fatal
info "Done." info "Done."
;; ;;
...@@ -309,12 +309,12 @@ __switch_alt_to_distro() ...@@ -309,12 +309,12 @@ __switch_alt_to_distro()
__switch_repo_to $TO __switch_repo_to $TO
__epm_ru_update || fatal __epm_ru_update || fatal
docmd epm downgrade rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again" docmd epm downgrade rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again"
__check_system
#if epm installed libcrypt >/dev/null ; then #if epm installed libcrypt >/dev/null ; then
# # glibc-core coflicts libcrypt # # glibc-core coflicts libcrypt
# docmd epm downgrade apt rpm pam pam0_passwdqc glibc-core libcrypt- || fatal # docmd epm downgrade apt rpm pam pam0_passwdqc glibc-core libcrypt- || fatal
#fi #fi
docmd epm downgrade docmd epm downgrade
__check_system
docmd epm upgrade || fatal docmd epm upgrade || fatal
info "Done." info "Done."
;; ;;
...@@ -324,8 +324,8 @@ __switch_alt_to_distro() ...@@ -324,8 +324,8 @@ __switch_alt_to_distro()
__switch_repo_to $TO __switch_repo_to $TO
__epm_ru_update || fatal __epm_ru_update || fatal
docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again" docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again"
__check_system
docmd epm downgrade docmd epm downgrade
__check_system
docmd epm upgrade || fatal docmd epm upgrade || fatal
info "Done." info "Done."
;; ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment