mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-31 01:04:25 +00:00
Merge pull request #82817 from pacien/smartd-fix-hostname-notifications
smartmontools: fix missing hostname in notifications
This commit is contained in:
commit
f8e6745ad3
@ -20,7 +20,7 @@ let
|
|||||||
${pkgs.coreutils}/bin/cat << EOF
|
${pkgs.coreutils}/bin/cat << EOF
|
||||||
From: smartd on ${host} <${nm.sender}>
|
From: smartd on ${host} <${nm.sender}>
|
||||||
To: undisclosed-recipients:;
|
To: undisclosed-recipients:;
|
||||||
Subject: SMART error on $SMARTD_DEVICESTRING: $SMARTD_FAILTYPE
|
Subject: $SMARTD_SUBJECT
|
||||||
|
|
||||||
$SMARTD_FULLMESSAGE
|
$SMARTD_FULLMESSAGE
|
||||||
EOF
|
EOF
|
||||||
@ -239,11 +239,7 @@ in
|
|||||||
|
|
||||||
systemd.services.smartd = {
|
systemd.services.smartd = {
|
||||||
description = "S.M.A.R.T. Daemon";
|
description = "S.M.A.R.T. Daemon";
|
||||||
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
path = [ pkgs.nettools ]; # for hostname and dnsdomanname calls in smartd
|
|
||||||
|
|
||||||
serviceConfig.ExecStart = "${pkgs.smartmontools}/sbin/smartd ${lib.concatStringsSep " " cfg.extraOptions} --no-fork --configfile=${smartdConf}";
|
serviceConfig.ExecStart = "${pkgs.smartmontools}/sbin/smartd ${lib.concatStringsSep " " cfg.extraOptions} --no-fork --configfile=${smartdConf}";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{ stdenv, fetchurl, autoreconfHook
|
{ stdenv, fetchurl, autoreconfHook
|
||||||
|
, mailutils, inetutils
|
||||||
, IOKit ? null , ApplicationServices ? null }:
|
, IOKit ? null , ApplicationServices ? null }:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -24,6 +25,10 @@ in stdenv.mkDerivation rec {
|
|||||||
patches = [ ./smartmontools.patch ];
|
patches = [ ./smartmontools.patch ];
|
||||||
postPatch = "cp -v ${driverdb} drivedb.h";
|
postPatch = "cp -v ${driverdb} drivedb.h";
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
"--with-scriptpath=${stdenv.lib.makeBinPath [ mailutils inetutils ]}"
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook ];
|
nativeBuildInputs = [ autoreconfHook ];
|
||||||
buildInputs = [] ++ stdenv.lib.optionals stdenv.isDarwin [IOKit ApplicationServices];
|
buildInputs = [] ++ stdenv.lib.optionals stdenv.isDarwin [IOKit ApplicationServices];
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user