rng-tools 部分情况默认配置错误处理

pull/355/head
wulabing 2019-11-29 17:05:24 +08:00
parent 5aabce2f25
commit 269c289796
2 changed files with 3 additions and 0 deletions

View File

@ -170,6 +170,7 @@ dependency_install(){
${INS} -y haveged ${INS} -y haveged
judge "haveged 安装" judge "haveged 安装"
sed -i -r '/^HRNGDEVICE/d;/#HRNGDEVICE=\/dev\/null/a HRNGDEVICE=/dev/urandom' /etc/default/rng-tools
if [[ "${ID}" == "centos" ]];then if [[ "${ID}" == "centos" ]];then
systemctl start rngd && systemctl enable rngd systemctl start rngd && systemctl enable rngd

View File

@ -178,6 +178,8 @@ dependency_install(){
${INS} -y haveged ${INS} -y haveged
judge "haveged 安装" judge "haveged 安装"
sed -i -r '/^HRNGDEVICE/d;/#HRNGDEVICE=\/dev\/null/a HRNGDEVICE=/dev/urandom' /etc/default/rng-tools
if [[ "${ID}" == "centos" ]];then if [[ "${ID}" == "centos" ]];then
systemctl start rngd && systemctl enable rngd systemctl start rngd && systemctl enable rngd
systemctl start haveged && systemctl enable haveged systemctl start haveged && systemctl enable haveged