project-config/nodepool/elements/infra-package-needs/post-install.d/80-enable-haveged
Matthew Thode 56929e4639
make a gentoo nodepool image
Depends-On: I17202de3016616ce34c8cbead7d0fb047a64e96b

Change-Id: Icf5e7e8bc4f005111cd2492d3c1a2c492b8a7a96
2017-10-18 15:20:11 -05:00

28 lines
441 B
Bash
Executable File

#!/bin/bash
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
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