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

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