blob: b5347901b608e6c792723297fa50d49f645b5157 [file] [log] [blame]
Willy Tue86ebe32022-03-14 15:26:51 -07001FILESEXTRAPATHS:prepend:gbmc := "${THISDIR}/${PN}:"
2
3SRC_URI:append:gbmc = " file://default"
William A. Kennington III24f6d992022-03-14 16:42:00 -07004
5SYSTEMD_SERVICE:${PN}:append:gbmc = " rngd-nojitter.service"
6
7do_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}