#!/bin/sh # # This script is invoked by the "afterdnf" plugin as soon as dnf # starts. It gets 1 argument: the PID of the dnf process. The job # of this script is to background another script which will wait # for that pid to exit, then run the real after dnf hooks. # # This seems extreme, but running the background job in another # login session helps make it be really, really, backgrounded # and not associated with the original command at all in any # way which would encourage anyone to wait on it even though # it is backgrounded :-). # su -l root /bin/bash -c \ "/usr/local/bin/bg-dammit /bin/bash /usr/local/bin/after-dnf-wait $1"