From d5c2b1989e6d79f7c618627d5eba29ac2b1d76e8 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Tue, 20 Feb 2018 20:04:28 +0100 Subject: [PATCH] nvidiactl: Return success if no Nvidia card was found MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, on systems with no Nvidia card, the script returns 1, which is considered an error. This causes the systemd service unit running this script to be shown as failed, and these systems are marked as *degraded* by systemd (`systemctl`, `systemdctl status`). But, having a system with no Nvidia card is totally fine, as there are such systems, and therefore shouldn’t be considered an error. Only return an error, if there really is some incorrect behavior. --- nvidiactl/nvidiactl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvidiactl/nvidiactl b/nvidiactl/nvidiactl index 89288d3..e7018b9 100755 --- a/nvidiactl/nvidiactl +++ b/nvidiactl/nvidiactl @@ -13,7 +13,7 @@ if [ -z ${nvver} ] ; then echo >&2 "WARNING: no nvidia card found.." rm -f /node/usr_share_mxgfx ln -sf /usr/share/mxgfx-generic /node/usr_share_mxgfx - exit 1 + exit 0 fi pciids="${PCIIDHINT_DIR}/${kver}-${nvver} ${PCIIDHINT_DIR}/${nvver}"