Blame SOURCES/redhat-bugzilla-2139012-pmdasnmp-config.patch

538a70
commit 4014e295f7b5f541439774bd3c88924d3c061325
538a70
Author: Masatake YAMATO <yamato@redhat.com>
538a70
Date:   Thu Oct 20 13:55:43 2022 +0900
538a70
538a70
    pmdas/snmp: install the agent specific configuration file to PMDATMPDIR
538a70
    
538a70
    When running ./Install of the agent, the following line is printed in
538a70
    /var/log/pcp/pmcd/snmp.log.
538a70
    
538a70
      Log for pmdasnmp on pcp-netsnmp started Tue Oct 18 22:45:23 2022
538a70
    
538a70
      opening /var/lib/pcp/pmdas/snmp/snmp.conf No such file or directory at /var/lib/pcp/pmdas/snmp/pmdasnmp.pl line 90.
538a70
    
538a70
    As a result, pmdasnmp.pl cannot read its configuration file though it
538a70
    is "./Install"ed.
538a70
    
538a70
    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
538a70
538a70
diff --git a/src/pmdas/snmp/GNUmakefile b/src/pmdas/snmp/GNUmakefile
538a70
index ce0e3e8036..7bf5471a76 100644
538a70
--- a/src/pmdas/snmp/GNUmakefile
538a70
+++ b/src/pmdas/snmp/GNUmakefile
538a70
@@ -44,7 +44,7 @@ install_pcp install: default
538a70
 	$(INSTALL) -m 755 -t $(PMDATMPDIR) Install Remove $(PMDAADMDIR)
538a70
 	$(INSTALL) -m 644 -t $(PMDATMPDIR)/pmda$(IAM).pl pmda$(IAM).pl $(PMDAADMDIR)/pmda$(IAM).pl
538a70
 	$(INSTALL) -m 755 -d $(PMDACONFIG)
538a70
-	$(INSTALL) -m 644 snmp.conf $(PMDACONFIG)/snmp.conf
538a70
+	$(INSTALL) -m 644 -t $(PMDATMPDIR)/$(IAM).conf $(IAM).conf $(PMDACONFIG)/$(IAM).conf
538a70
 	@$(INSTALL_MAN)
538a70
 else
538a70
 build-me:
538a70