Some packages, when installed for the first time or when upgraded, require the system to be rebooted for the new package features to take affect. At this time, there is no standard manner for a package to notify the system that it needs to be rebooted. This enhancement would provide a consistent manner for the system to discover if a reboot is required after an upgrade or new package installation. A suggested manner would be to add a flag, such as NEEDS_REBOOT or whatever name makes sense, to a recipe for a package that needs the system to reboot for changes to take affect. If this flag is set, then the following text is added to the end of the package's pkg_postinst(): #!/bin/sh touch /var/run/reboot-required echo ${PN} >>/var/run/reboot-required.pkgs The application responsible for package installation or upgrade can then check for the existence of /var/run/reboot-required to see if the system needs to be rebooted. The /var/run/reboot-required.pkgs file provides a list of all packages requesting the reboot to show the end user if desired.
Rather than a variable, a bbclass might be a easier way to indicate it.