Skip to content

Commit

Permalink
Merge pull request uyuni-project#9524 from mcalmer/fix-undef-var-in-r…
Browse files Browse the repository at this point in the history
…ebootifneeded

Fix rebootifneeded state which miss definition of a variable (bsc#1233426)
  • Loading branch information
mcalmer authored Nov 27, 2024
2 parents 7846aa0 + ff10c9c commit 6e7660a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion susemanager-utils/susemanager-sls/salt/rebootifneeded.sls
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ mgr_reboot_if_needed:
- onlyif:
- test -e /boot/do_purge_kernels
{%- else %}
- onlyif: 'zypper ps -s; [ $? -eq 102 ] || [ {{ patch_need_reboot }} -eq 0 ]'
- onlyif: 'zypper ps -s; [ $? -eq 102 ]'
{%- endif %}
{%- endif %}
12 changes: 12 additions & 0 deletions susemanager-utils/susemanager-sls/salt/uptodate.sls
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,15 @@ mgr_keep_system_up2date_pkgs:
- require:
- sls: channels
- mgr_keep_system_up2date_updatestack

{%- if grains['os_family'] == 'Suse' and grains['osmajorrelease'] >= 15 %}

# zypper up does not evaluate reboot_suggested flags in patches. We need to do it manual
mgr_flag_reboot_needed:
file.touch:
- name: /run/reboot-needed
- onlyif: '[ {{ patch_need_reboot|default(1) }} -eq 0 ]'
- require:
- pkg: mgr_keep_system_up2date_pkgs

{% endif %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Fix rebootifneeded state which miss definition of a variable
(bsc#1233426)

0 comments on commit 6e7660a

Please sign in to comment.