Willy Tu | e86ebe3 | 2022-03-14 15:26:51 -0700 | [diff] [blame] | 1 | FILESEXTRAPATHS:prepend:gbmc := "${THISDIR}/${PN}:" |
| 2 | |
| 3 | SRC_URI:append:gbmc = " file://default" |
William A. Kennington III | 24f6d99 | 2022-03-14 16:42:00 -0700 | [diff] [blame^] | 4 | |
| 5 | SYSTEMD_SERVICE:${PN}:append:gbmc = " rngd-nojitter.service" |
| 6 | |
| 7 | do_install:append:gbmc() { |
| 8 | install -m 0644 ${D}${systemd_system_unitdir}/rngd.service \ |
| 9 | ${D}${systemd_system_unitdir}/rngd-nojitter.service |
| 10 | # Don't enable jitter in rngd-nojitter |
| 11 | sed -i 's,\$EXTRA_ARGS,-x jitter \$EXTRA_ARGS,' \ |
| 12 | ${D}${systemd_system_unitdir}/rngd-nojitter.service |
| 13 | # Run the jitter enabled service if this one fails |
| 14 | sed -i '/^\[Unit\]$/aOnFailure=rngd.service\nConflicts=rngd.service' \ |
| 15 | ${D}${systemd_system_unitdir}/rngd-nojitter.service |
| 16 | |
| 17 | # Don't run the jitter service by default |
| 18 | sed -i '/^WantedBy=/d' ${D}${systemd_system_unitdir}/rngd.service |
| 19 | } |