Skip to content

Commit

Permalink
nvidiactl: Return success if no Nvidia card was found
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pmenzel committed Feb 20, 2018
1 parent 07ce784 commit d5c2b19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nvidiactl/nvidiactl
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit d5c2b19

Please sign in to comment.