Skip to content

Conversation

pyro3d
Copy link

@pyro3d pyro3d commented Aug 16, 2019

Adds FreeBSD support:

  1. Changes the direct binary execution to use a variable (binary found with whereis)
  2. Allows ATACAM driver (SATA drives in FreeBSD)

Tested on Debian 9, as well as FreeBSD 12.

@ghost ghost mentioned this pull request Sep 2, 2019
discordianfish pushed a commit that referenced this pull request Sep 2, 2019
In some cases apt.sh could output duplicated arch values causing the
following error:

Aug 29 12:12:22 host123 prometheus-node-exporter[2235]: time="2019-08-29T12:12:22Z" level=error msg="error gathering metrics: [from Gatherer #2] collected metric \"apt_upgrades_pending\" { label:<name:\"arch\" value:\"Debian/Ubuntu\" > label:<name:\"origin\" value:\"PostgreSQLfor\" > gauge:<value:6 > } was collected before with the same name and label values\n" source="log.go:172"

Signed-off-by: Andrey Arapov <[email protected]>
)"

# Find the smartctl binary, usually in /usr/sbin (Linux) or /usr/local/sbin (FreeBSD)
SMARTCTL_BIN="$(whereis smartctl | awk '{print $2}')"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this essentially just be the same as omitting the path prefix from the smartctl commands, and letting the shell's PATH find it?

@dswarbrick
Copy link
Member

Closing due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants