[Bug 1191260] kernel 5.14.8 post scriptlets failing
https://bugzilla.suse.com/show_bug.cgi?id=1191260 https://bugzilla.suse.com/show_bug.cgi?id=1191260#c14 --- Comment #14 from Martin Wilck <martin.wilck@suse.com> --- We have different taste wrt what code is easy to understand and read. I guess we will have to deal with that somehow. Being adults, we should be able to figure it out. If we need a different tool for enrolling certificates on Power/s390, I expect that we will not work with explicit conditionals everywhere. Instead we'll add some abstraction layer that hides the architecture specifics and let us do high level operations like "enroll" or "delete"; and "is_supported", too. The code will then look like this: is_supported() { case $arch in power) ...;; s390x) ...;; *) mokutil --sb-state;; esac } if ! is_supported; then exit 0 fi case $op in post) enroll;; postun) delete;; ... esac ... which is nice and clean, IMHO. We can simplify the conditionals inside the last case statement because we don't need to worry whether certificates are generally supported in the first place. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com