nut-upsdev at mcwest.org
2016-Apr-26 02:26 UTC
[Nut-upsdev] [PATCH] upsmon: Add NOTIFYMSG to env of NOTIFYCMD
This small patch makes the alert text generated by upsmon available in the environment of the CMDSCRIPT child of upssched. This is needed as the command line argument to upssched is not passed through when it calls CMDSCRIPT. --- upsmon.c 2016-04-25 20:17:44.392925130 -0600 +++ upsmon.c+ 2016-04-25 20:18:21.512871526 -0600 @@ -151,6 +151,7 @@ setenv("UPSNAME", "", 1); setenv("NOTIFYTYPE", ntype, 1); + setenv("NOTIFYMSG", notice, 1); if (system(exec) == -1) { upslog_with_errno(LOG_ERR, "%s", __func__); }