
Change-Id: I5ec8841ce93765d8b13477f9d342cb8d149c151f Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
33 lines
602 B
Bash
Executable File
33 lines
602 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
if [[ "$DISTRO_NAME" =~ ^(almalinux|centos|rocky)$ && ! ${DIB_RELEASE} =~ '8' ]]; then
|
|
# For EL9 and newer we are just using the default rngd
|
|
exit 0
|
|
fi
|
|
|
|
case "$DIB_INIT_SYSTEM" in
|
|
upstart)
|
|
# nothing to do
|
|
exit 0
|
|
;;
|
|
systemd)
|
|
systemctl enable haveged.service
|
|
;;
|
|
openrc)
|
|
rc-update add haveged default
|
|
;;
|
|
sysv)
|
|
exit 0
|
|
;;
|
|
*)
|
|
echo "Unsupported init system $DIB_INIT_SYSTEM"
|
|
exit 1
|
|
;;
|
|
esac
|