From e126e6d502c7034ee1773e2e9b2a9f855c804ce2 Mon Sep 17 00:00:00 2001 From: Kristian Haugene Date: Sat, 31 Oct 2015 18:39:56 +0100 Subject: [PATCH] Only symlink /dev/urandom if /dev/random doesn't exist --- transmission/start.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/transmission/start.sh b/transmission/start.sh index 1b598a6..c30fa02 100755 --- a/transmission/start.sh +++ b/transmission/start.sh @@ -12,9 +12,13 @@ echo "Generating transmission settings.json from env variables" mkdir -p ${TRANSMISSION_HOME} dockerize -template /etc/transmission/settings.tmpl:${TRANSMISSION_HOME}/settings.json /bin/true +if [ ! -e "/dev/random" ]; then + # Avoid "Fatal: no entropy gathering module detected" error + echo "INFO: /dev/random not found - symlink to /dev/urandom" + ln -s /dev/urandom /dev/random +fi + echo "STARTING TRANSMISSION" -# Avoid "Fatal: no entropy gathering module detected" error -ln -s /dev/urandom /dev/random exec /usr/bin/transmission-daemon -g ${TRANSMISSION_HOME} --logfile ${TRANSMISSION_HOME}/transmission.log & if [ "$OPENVPN_PROVIDER" = "PIA" ]