Skip to content

Commit

Permalink
proc_sys discovery now ignores I/O errors
Browse files Browse the repository at this point in the history
In Fedora, one of the /proc/sys values existed, was readable, and
got an I/O error when reading it which caused the script to barf.

Now it just ignores that value and keeps on going.
  • Loading branch information
Alan-R committed Dec 24, 2015
1 parent c20d6ef commit e3d0e1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions discovery_agents/proc_sys
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# This file is part of the Assimilation Project.
#
# Author: Alan Robertson <[email protected]>
# Copyright (C) 2014 - Assimilation Systems Limited
# Copyright (C) 2014,2015 - Assimilation Systems Limited
#
# Free support is available from the Assimilation Project community - http://assimproj.org
# Paid support is available from Assimilation Systems Limited - http://assimilationsystems.com
Expand Down Expand Up @@ -186,7 +186,7 @@ format_dir_contents() {
continue
fi
procdot=$(echo ${proc_name} | sed 's%/%.%g')
contents="$(cat "${proc_name}" 2>/dev/null)"
contents="$(cat "${proc_name}" 2>/dev/null || true)"
if
[ -z "${contents}" ]
then
Expand Down

0 comments on commit e3d0e1e

Please sign in to comment.