When refactoring for the ruby:2.4-slim-stretch base image, I introduced a bug which prevented the search & replace for /dev, /proc and /sys directory names in the sensu plugins. This PR solves this issue.
I've also slightly rephrased the sed expressions used to find the aforementioned paths and narrowed them to the beginning of a string. Otherwise, paths like /proc/net/dev (found in metrics-interface.rb) could break.
Unfortunately, the new sed mechanism doesn't work in a regular expression context like here or here.
A more sustainable solution might be to refactor the affected sensu plugins so that they can take parameters to locate the proper /dev, /proc and /sys directories.
I have not tested out the sed replacing of dev,proc,sys before so I'll have to go back through the code base and test out the old and current behavior.
When refactoring for the
ruby:2.4-slim-stretch
base image, I introduced a bug which prevented the search & replace for/dev
,/proc
and/sys
directory names in the sensu plugins. This PR solves this issue.I've also slightly rephrased the
sed
expressions used to find the aforementioned paths and narrowed them to the beginning of a string. Otherwise, paths like/proc/net/dev
(found in metrics-interface.rb) could break.