[Nut-upsdev] [PATCH] upsmon: Add NOTIFYMSG to env of NOTIFYCMD

nut-upsdev at mcwest.org nut-upsdev at mcwest.org
Tue Apr 26 02:26:06 UTC 2016


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__);
                        }



More information about the Nut-upsdev mailing list