From patchwork Wed Sep 12 04:28:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Fischer X-Patchwork-Id: 1928 Return-Path: Received: from mail01.ipfire.org (mail01.ipfire.org [IPv6:2001:470:7183:25::1]) by web02.i.ipfire.org (Postfix) with ESMTP id A74E061A14 for ; Tue, 11 Sep 2018 20:28:32 +0200 (CEST) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 2BFF710C8A44; Tue, 11 Sep 2018 19:28:32 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1536690512; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references:list-id: list-unsubscribe:list-subscribe:list-post; bh=oDfQVPCDQf1h5UHkxdPNdZQXsrE9IMP0XTv9AUxuuiI=; b=hzYu+mhm/2Y2VA4tgcr0mHC4DFmTV4bBWvjnlhgymmzbO6VpLPHAX437XbAdkjpjPyGSTC 4nOkgClLvj7Mw9dYejc0lLyqKk1iDd6D+ryIEYIn+XeJJG+DYxEYeEXK1yxOja90tYw3l8 kntVkgn/TWlM6lRpCEOldwNmx6qyB3HhayHYyjMNhuqxirSQVQL66B2hZEWnUmJlQtEgiV 6gB6y4/vR9Nmf8IV0wL61dxapoHesL6qL1H2/dkLCKc0A2K/ojiiOxYuSFLfuKpyWQb2hd 2nWuSVTwtjIP3VNmwwGR0WxTS3t9S+otebJlskp6njsdZYCGWh0cz1pFbqFtcQ== Received: from Devel.localdomain (p5B0A0BE0.dip0.t-ipconnect.de [91.10.11.224]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 6DC6D109370B for ; Tue, 11 Sep 2018 19:28:29 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1536690509; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=oDfQVPCDQf1h5UHkxdPNdZQXsrE9IMP0XTv9AUxuuiI=; b=M0ovLrUIogC0I3WZ5bsEI65wub6jfa4HwOgjDn5aCwGtVW3G/rft8hYt+GKY7fsyUpFg62 KbjwLw8lW3lc+ddHtkWd9qr209g1GuMLy6u52LAyMnEF2jn37xUDii1LGqgUp0CAO8HFMu asE774NZpdWj244tQRaLVv/48l4wWQiJIr83w9uz6Hag7NVYEBxnkIvxuO5wT0QHHv+ckH fvDBrBSkouhOnhwdQy6+80UrF2CPL9AFXnTtVJ2OAENRMQJhnLINqA9f6fgCiXyqArqeau sRn/04zmuO92Ulj6fsPAd2cH0mTKX2+CKaim8fAV8Noiq3u4UofpaW5fBlp+jg== From: Matthias Fischer To: development@lists.ipfire.org Subject: [PATCH] Suggested fix for 'rngd' service status Date: Tue, 11 Sep 2018 20:28:24 +0200 Message-Id: <20180911182824.28272-1-matthias.fischer@ipfire.org> X-Mailer: git-send-email 2.18.0 Authentication-Results: mail01.ipfire.org; auth=pass smtp.auth=mfischer smtp.mailfrom=matthias.fischer@ipfire.org X-Spamd-Result: default: False [-5.09 / 11.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DKIM_SIGNED(0.00)[]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM(-2.99)[-0.998,0]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:3320, ipnet:91.0.0.0/10, country:DE]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Status: No, score=-5.09 X-Rspamd-Server: mail01.i.ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Hi, Since https://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff;h=fd0a0384f07b399e9cb4cf46b4c5722b809ffe6a 'rngd' is running again with much higher values. STATUS / ENTROPY shows RUNNING. Thanks! ;-) But '/var/run/rngd.pid' is created with wrong rights (0600). Therefore, STATUS / SERVICES tells me 'rngd' is stopped. The suggested fix checks whether '/var/run/rngd.pid' exists and sets rights accordingly. Best, Matthias Signed-off-by: Matthias Fischer --- src/initscripts/system/rngd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/initscripts/system/rngd b/src/initscripts/system/rngd index 91b70a7b4..8fe5c9363 100644 --- a/src/initscripts/system/rngd +++ b/src/initscripts/system/rngd @@ -15,6 +15,9 @@ case "${1}" in start) boot_mesg "Starting Random Number Generator Daemon..." loadproc /usr/sbin/rngd --quiet + if [ -f "/var/run/rngd.pid" ]; then + chmod 644 /var/run/rngd.pid + fi ;; stop)