Description of problem: When install kernel, preun and posttrans rpm scripts failed as follows. ================ /bin/kernel-install: line 143: return: can only `return' from a function or sourced script error: %preun(kernel-core-4.7.7-200.fc24.x86_64) scriptlet failed, exit status 77 Error in PREUN scriptlet in rpm package kernel-core Error in PREUN scriptlet in rpm package kernel-core error: kernel-core-4.7.7-200.fc24.x86_64: erase failed /bin/kernel-install: line 130: return: can only `return' from a function or sourced script /usr/lib/kernel/install.d/51-dracut-rescue.install: line 68: /boot/loader/entries/81c8b41cb75e472dabc8e298e2402fc9-0-rescue.conf: No such file or directory warning: %posttrans(kernel-core-4.8.6-201.fc24.x86_64) scriptlet failed, exit status 78 Non-fatal POSTTRANS scriptlet failure in rpm package kernel-core Non-fatal POSTTRANS scriptlet failure in rpm package kernel-core ================ I guess the line 4 in 20-grubby.install http://pkgs.fedoraproject.org/cgit/rpms/systemd.git/tree/20-grubby.install?id=12da227455a6872d695cdcac1093b6b5fe9f9008#n4 should be `exit` instead of `return`. Version-Release number of selected component (if applicable): systemd-232-1 How reproducible: Always. Steps to Reproduce: 1. update systemd to 232-1 2. update or install kernel 3. Actual results: Install completes without the above error messages. Expected results: Shows the above error messages. Additional info:
Sorry, the above error messages comes from kernel-install script, https://github.com/systemd/systemd/pull/4565 > I guess the line 4 in 20-grubby.install > http://pkgs.fedoraproject.org/cgit/rpms/systemd.git/tree/20-grubby.install?id=12da227455a6872d695cdcac1093b6b5fe9f9008#n4 > should be `exit` instead of `return`. However the above modification is also required I think.