[Ultrapossum-cvs 190] plugin/snmp ...

アーカイブの一覧に戻る

Masato Taruishi taru****@sourc*****
2004年 6月 19日 (土) 02:41:58 JST


===================================================================
RCS file: plugin/snmp/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- plugin/snmp/Makefile.am	2004/06/18 17:02:05	1.1
+++ plugin/snmp/Makefile.am	2004/06/18 17:41:58	1.2
@@ -8,9 +8,10 @@
 templatedir = $(sysconfdir)/ultrapossum/in.d
 template_DATA = snmpd.conf.in
 
-modulelocal_SCRIPTS = snmpgen
+modulelocal_DATA = snmpgen.in
 
 EXTRA_DIST = \
 	update-sasl \
-	01snmp
+	01snmp \
+	snmpgen.in
 
===================================================================
RCS file: plugin/snmp/snmpd.conf.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- plugin/snmp/snmpd.conf.in	2004/06/18 17:02:05	1.1
+++ plugin/snmp/snmpd.conf.in	2004/06/18 17:41:58	1.2
@@ -3,8 +3,8 @@
 group	UltraPossum	v1		ultrapossum
 view 	ultrapossum 	included	#SNMP_MIB#
 access	UltraPossum 	""	any       noauth exact ultrapossum none none
-exec #SNMP_MIB#.1 config #MODULEDIR#/snmp/snmpgen config
-exec #SNMP_MIB#.2 status #MODULEDIR#/snmp/snmpgen status #SLAPD_PIDFILE# #SLAPD_SLAVE_PIDFILE# #TYPE#
-exec #SNMP_MIB#.3 pid    #MODULEDIR#/snmp/snmpgen pid #SLAPD_PIDFILE# #SLAPD_SLAVE_PIDFILE#
-exec #SNMP_MIB#.4 since  #MODULEDIR#/snmp/snmpgen since #SLAPD_PIDFILE# #SLAPD_SLAVE_PIDFILE#
+exec #SNMP_MIB#.1 config #CONFDIR#/snmpgen config
+exec #SNMP_MIB#.2 status #CONFDIR#/snmpgen status
+exec #SNMP_MIB#.3 pid    #CONFDIR#/snmpgen pid
+exec #SNMP_MIB#.4 since  #CONFDIR#/snmpgen since
 
===================================================================
RCS file: plugin/snmp/update-snmp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- plugin/snmp/update-snmp	2004/06/18 17:02:05	1.1
+++ plugin/snmp/update-snmp	2004/06/18 17:41:58	1.2
@@ -28,13 +28,18 @@
 configure() {
   progress "Configuring SNMP... "
   add_startmark "##" $id > $tmp
-  sed -e "s/#SNMP_MIB#/$SNMP_MIB/" -e "s!#MODULEDIR#!$MODULEDIR!" \
-      -e "s/#TYPE#/$TYPE/" -e "s!#SLAPD_PIDFILE#!$SLAPD_PIDFILE!" \
-      -e "s!#SLAPD_SLAVE_PIDFILE#!$SLAPD_SLAVE_PIDFILE!" \
-  					< $SNMPD_CONF_IN >> $tmp
+  sed -e "s/#SNMP_MIB#/$SNMP_MIB/" -e "s!#CONFDIR#!$CONFDIR!" \
+ 					< $SNMPD_CONF_IN >> $tmp
   add_endmark "##" $id >> $tmp
   add_end_vaconf $SNMPD_CONF $tmp $id
   progress "Configuring SNMP... done"
+
+  sed -e "s!#MODULEDIR#!$MODULEDIR!" \
+      -e "s/#TYPE#/$TYPE/" -e "s!#SLAPD_PIDFILE#!$SLAPD_PIDFILE!" \
+      -e "s!#SLAPD_SLAVE_PIDFILE#!$SLAPD_SLAVE_PIDFILE!" \
+      -e "s!#CHROOTDIRECTORY#!$CHROOTDIRECTORY!" < $SNMPGEN_IN > $SNMPGEN
+  chmod 755 $SNMPGEN
+
   if test -f "/etc/init.d/snmpd"; then
     /etc/init.d/snmpd restart 1>&2
   fi
@@ -43,6 +48,7 @@
 remove() {
   progress "Removing SNMP... "
   if test -f $SNMPD_CONF; then strip_vaconf $SNMPD_CONF $id; fi
+  /bin/rm -f $SNMPGEN
   progress "Removing SNMP... done"
 }
 



Ultrapossum-cvs メーリングリストの案内
アーカイブの一覧に戻る