blob: abf0113d67361b420c64e3263d65c16499a37d48 [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
Patrick Williams6cd13da2022-08-22 05:35:02 -05005SYSTEMD_SERVICE:${PN}:append:gbmc = " rng-tools-nojitter.service"
William A. Kennington III24f6d992022-03-14 16:42:00 -07006
7do_install:append:gbmc() {
Patrick Williams6cd13da2022-08-22 05:35:02 -05008 install -m 0644 ${D}${systemd_system_unitdir}/rng-tools.service \
9 ${D}${systemd_system_unitdir}/rng-tools-nojitter.service
10 # Don't enable jitter in rng-tools-nojitter
William A. Kennington III24f6d992022-03-14 16:42:00 -070011 sed -i 's,\$EXTRA_ARGS,-x jitter \$EXTRA_ARGS,' \
Patrick Williams6cd13da2022-08-22 05:35:02 -050012 ${D}${systemd_system_unitdir}/rng-tools-nojitter.service
William A. Kennington III24f6d992022-03-14 16:42:00 -070013 # Run the jitter enabled service if this one fails
Patrick Williams6cd13da2022-08-22 05:35:02 -050014 sed -i '/^\[Unit\]$/aOnFailure=rng-tools.service\nConflicts=rng-tools.service' \
15 ${D}${systemd_system_unitdir}/rng-tools-nojitter.service
William A. Kennington III24f6d992022-03-14 16:42:00 -070016
17 # Don't run the jitter service by default
Patrick Williams6cd13da2022-08-22 05:35:02 -050018 sed -i '/^WantedBy=/d' ${D}${systemd_system_unitdir}/rng-tools.service
William A. Kennington III24f6d992022-03-14 16:42:00 -070019}