pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Copy sysutils/munin-node from actual pkgsrc as prep.



Module Name:	pkgsrc-wip
Committed By:	Alexander Schreiber <als%thangorodrim.de@localhost>
Pushed By:	als
Date:		Thu May 11 20:32:04 2023 +0000
Changeset:	c22b89151cf2a990613a17cdfd264329a0cdc4e3

Modified Files:
	Makefile
Added Files:
	munin-node/DESCR
	munin-node/MESSAGE
	munin-node/Makefile
	munin-node/PLIST
	munin-node/PLIST.AIX
	munin-node/PLIST.FreeBSD
	munin-node/PLIST.Linux
	munin-node/PLIST.NetBSD
	munin-node/PLIST.SunOS
	munin-node/files/munin-node.sh
	munin-node/files/smf/manifest.xml

Log Message:
Copy sysutils/munin-node from actual pkgsrc as prep.

Copy the current state of sysutils/munin-node from pkgsrc as
prep for working on the package to locally fix the irqstats bug,
upstream: https://github.com/munin-monitoring/munin/issues/1537

Signed-off-by: Alexander Schreiber <als%thangorodrim.de@localhost>

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c22b89151cf2a990613a17cdfd264329a0cdc4e3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                          |   1 +
 munin-node/DESCR                  |   7 ++
 munin-node/MESSAGE                |   6 +
 munin-node/Makefile               |  48 ++++++++
 munin-node/PLIST                  | 225 ++++++++++++++++++++++++++++++++++++++
 munin-node/PLIST.AIX              |   2 +
 munin-node/PLIST.FreeBSD          |  13 +++
 munin-node/PLIST.Linux            |  52 +++++++++
 munin-node/PLIST.NetBSD           |  19 ++++
 munin-node/PLIST.SunOS            |  14 +++
 munin-node/files/munin-node.sh    |  61 +++++++++++
 munin-node/files/smf/manifest.xml |  37 +++++++
 12 files changed, 485 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index f8579d7ced..9cc293cddc 100644
--- a/Makefile
+++ b/Makefile
@@ -2495,6 +2495,7 @@ SUBDIR+=	multisync-syncml-moto
 SUBDIR+=	multitail
 SUBDIR+=	mummer4
 SUBDIR+=	munge
+SUBDIR+=	munin
 SUBDIR+=	muon
 SUBDIR+=	mupen64plus
 SUBDIR+=	mupen64plus-extraplugins
diff --git a/munin-node/DESCR b/munin-node/DESCR
new file mode 100644
index 0000000000..73694b6a6f
--- /dev/null
+++ b/munin-node/DESCR
@@ -0,0 +1,7 @@
+Munin is a tool for graphing all sorts of information about one or
+more servers and displaying it in a web interface.  It uses the
+execellent RRDTool (written by Tobi Oetiker) and is written in Perl.
+Munin has a master/node architecture.  The master connects to all the
+nodes at regular intervals, and asks them for data.  It then stores
+the data in RRD-files, and (if needed) updates the graphs.  One of the
+main goals has been ease of creating own "plugins" (graphs).
diff --git a/munin-node/MESSAGE b/munin-node/MESSAGE
new file mode 100644
index 0000000000..3debab0e8f
--- /dev/null
+++ b/munin-node/MESSAGE
@@ -0,0 +1,6 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.4 2019/09/09 12:21:44 tm Exp $
+
+Plugins can be auto-configured with "munin-node-configure --shell | sh"
+
+===========================================================================
diff --git a/munin-node/Makefile b/munin-node/Makefile
new file mode 100644
index 0000000000..3e8696907c
--- /dev/null
+++ b/munin-node/Makefile
@@ -0,0 +1,48 @@
+# $NetBSD: Makefile,v 1.49 2022/10/11 14:38:47 taca Exp $
+
+PKGNAME=	${DISTNAME:S/munin/munin-node/}
+PKGREVISION=	2
+COMMENT=	System monitoring tool, client version
+
+.include "../../sysutils/munin-common/Makefile.common"
+
+DEPENDS+=	munin-common>=${PKGVERSION_NOREV}:../../sysutils/munin-common
+DEPENDS+=	p5-IO-Socket-INET6>=0:../../net/p5-IO-Socket-INET6
+DEPENDS+=	p5-List-MoreUtils>=0:../../devel/p5-List-MoreUtils
+DEPENDS+=	p5-Net-SSLeay>=0:../../security/p5-Net-SSLeay
+DEPENDS+=	p5-Net-Server>=0:../../net/p5-Net-Server
+DEPENDS+=	p5-Socket6>=0:../../net/p5-Socket6
+#DEPENDS+=	p5-Time-HiRes>=0:../../time/p5-Time-HiRes
+
+OWN_DIRS=		${PKG_SYSCONFDIR}/plugin-conf.d
+OWN_DIRS+=		${PKG_SYSCONFDIR}/plugins
+
+OWN_DIRS_PERMS+=	${MUNIN_DBDIR} ${MUNIN_USER} ${MUNIN_GROUP} 0755
+OWN_DIRS_PERMS+=	${MUNIN_LOGDIR} ${MUNIN_USER} ${MUNIN_GROUP} 0755
+OWN_DIRS_PERMS+=	${MUNIN_PLUGSTATE} nobody ${MUNIN_GROUP} 0775
+OWN_DIRS_PERMS+=	${MUNIN_SPOOLDIR} ${MUNIN_USER} ${MUNIN_GROUP} 0775
+OWN_DIRS_PERMS+=	${MUNIN_STATEDIR} ${MUNIN_USER} ${MUNIN_GROUP} 0755
+
+REPLACE_PERL+=		node/sbin/munin-node
+REPLACE_PERL+=		node/sbin/munin-node-configure
+REPLACE_PERL+=		node/sbin/munin-run
+REPLACE_PERL+=		plugins/node.d/slony_lag_.in
+
+CONF_FILES+=		${EGDIR}/munin-node.conf ${PKG_SYSCONFDIR}/munin-node.conf
+INSTALLATION_DIRS+=	${EGDIR}
+
+CHECK_INTERPRETER_SKIP+=	lib/munin/plugins/tomcat_
+
+CHECK_PORTABILITY_SKIP+=	plugins/*
+
+RCD_SCRIPTS+=		munin-node
+
+BUILD_TARGET=		build
+INSTALL_TARGET=		install-node install-node-plugins
+
+post-install:
+	${INSTALL_DATA} ${WRKSRC}/build/node/munin-node.conf ${DESTDIR}${EGDIR}
+
+.include "../../lang/python/application.mk"
+.include "../../lang/ruby/rubyversion.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/munin-node/PLIST b/munin-node/PLIST
new file mode 100644
index 0000000000..7ec26eebb5
--- /dev/null
+++ b/munin-node/PLIST
@@ -0,0 +1,225 @@
+@comment $NetBSD: PLIST,v 1.18 2021/07/25 13:26:36 tm Exp $
+bin/munin-get
+bin/munindoc
+lib/munin/plugins/amavis
+lib/munin/plugins/apache_accesses
+lib/munin/plugins/apache_processes
+lib/munin/plugins/apache_volume
+lib/munin/plugins/apc_envunit_
+lib/munin/plugins/apc_nis
+lib/munin/plugins/bind9
+lib/munin/plugins/bind9_rndc
+lib/munin/plugins/cmc_tc_sensor_
+lib/munin/plugins/courier_
+lib/munin/plugins/courier_mta_mailqueue
+lib/munin/plugins/courier_mta_mailstats
+lib/munin/plugins/courier_mta_mailvolume
+lib/munin/plugins/cupsys_pages
+lib/munin/plugins/df
+lib/munin/plugins/df_inode
+lib/munin/plugins/dhcpd3
+lib/munin/plugins/digitemp_
+lib/munin/plugins/ejabberd_
+lib/munin/plugins/exim_mailqueue
+lib/munin/plugins/exim_mailqueue_alt
+lib/munin/plugins/exim_mailstats
+lib/munin/plugins/fail2ban
+lib/munin/plugins/foldingathome
+lib/munin/plugins/foldingathome_rank
+lib/munin/plugins/foldingathome_wu
+lib/munin/plugins/freeradius_acct
+lib/munin/plugins/freeradius_auth
+lib/munin/plugins/freeradius_proxy_acct
+lib/munin/plugins/freeradius_proxy_auth
+lib/munin/plugins/haproxy_
+lib/munin/plugins/haproxy_ng
+lib/munin/plugins/hddtemp
+lib/munin/plugins/hddtemp2
+lib/munin/plugins/hddtemp_smartctl
+lib/munin/plugins/hddtempd
+lib/munin/plugins/hp2000_
+lib/munin/plugins/http_loadtime
+lib/munin/plugins/ifx_concurrent_sessions_
+lib/munin/plugins/ipac-ng
+lib/munin/plugins/ipmi_
+lib/munin/plugins/ipmi_sensor_
+lib/munin/plugins/ircu
+lib/munin/plugins/loggrep
+lib/munin/plugins/lpstat
+lib/munin/plugins/mailman
+lib/munin/plugins/mailscanner
+lib/munin/plugins/mbmon_
+lib/munin/plugins/memcached_
+lib/munin/plugins/mhttping
+lib/munin/plugins/multiping
+lib/munin/plugins/multips
+lib/munin/plugins/multips_memory
+lib/munin/plugins/munin_stats
+lib/munin/plugins/munin_update
+lib/munin/plugins/mysql_
+lib/munin/plugins/mysql_bytes
+lib/munin/plugins/mysql_innodb
+lib/munin/plugins/mysql_isam_space_
+lib/munin/plugins/mysql_queries
+lib/munin/plugins/mysql_slowqueries
+lib/munin/plugins/mysql_threads
+lib/munin/plugins/named
+lib/munin/plugins/netopia
+lib/munin/plugins/netstat
+lib/munin/plugins/nginx_request
+lib/munin/plugins/nginx_status
+lib/munin/plugins/nomadix_users_
+lib/munin/plugins/ntp_
+lib/munin/plugins/ntp_kernel_err
+lib/munin/plugins/ntp_kernel_pll_freq
+lib/munin/plugins/ntp_kernel_pll_off
+lib/munin/plugins/ntp_offset
+lib/munin/plugins/ntp_states
+lib/munin/plugins/nut_misc
+lib/munin/plugins/nut_volts
+lib/munin/plugins/nutups_
+lib/munin/plugins/nvidia_
+lib/munin/plugins/openvpn
+lib/munin/plugins/perdition
+lib/munin/plugins/pgbouncer_connections
+lib/munin/plugins/pgbouncer_requests
+lib/munin/plugins/ping_
+lib/munin/plugins/plugin.sh
+lib/munin/plugins/plugins.history
+lib/munin/plugins/pm3users_
+lib/munin/plugins/pop_stats
+lib/munin/plugins/postfix_mailqueue
+lib/munin/plugins/postfix_mailstats
+lib/munin/plugins/postfix_mailvolume
+lib/munin/plugins/postgres_autovacuum
+lib/munin/plugins/postgres_bgwriter
+lib/munin/plugins/postgres_cache_
+lib/munin/plugins/postgres_checkpoints
+lib/munin/plugins/postgres_connections_
+lib/munin/plugins/postgres_connections_db
+lib/munin/plugins/postgres_locks_
+lib/munin/plugins/postgres_oldest_prepared_xact_
+lib/munin/plugins/postgres_prepared_xacts_
+lib/munin/plugins/postgres_querylength_
+lib/munin/plugins/postgres_scans_
+lib/munin/plugins/postgres_size_
+lib/munin/plugins/postgres_streaming_
+lib/munin/plugins/postgres_transactions_
+lib/munin/plugins/postgres_tuples_
+lib/munin/plugins/postgres_users
+lib/munin/plugins/postgres_xlog
+lib/munin/plugins/processes
+lib/munin/plugins/proxy_plugin
+lib/munin/plugins/ps_
+lib/munin/plugins/psu_
+lib/munin/plugins/qmailqstat
+lib/munin/plugins/qmailscan
+lib/munin/plugins/qmailscan-simple
+lib/munin/plugins/samba
+lib/munin/plugins/sendmail_mailqueue
+lib/munin/plugins/sendmail_mailstats
+lib/munin/plugins/sendmail_mailtraffic
+lib/munin/plugins/slapd_
+lib/munin/plugins/slapd_bdb_cache_
+lib/munin/plugins/slony_lag_
+lib/munin/plugins/smart_
+lib/munin/plugins/snmp__cpuload
+lib/munin/plugins/snmp__df
+lib/munin/plugins/snmp__df_ram
+lib/munin/plugins/snmp__fc_if_
+lib/munin/plugins/snmp__fc_if_err_
+lib/munin/plugins/snmp__if_
+lib/munin/plugins/snmp__if_err_
+lib/munin/plugins/snmp__if_multi
+lib/munin/plugins/snmp__load
+lib/munin/plugins/snmp__memory
+lib/munin/plugins/snmp__netapp_diskusage_
+lib/munin/plugins/snmp__netapp_inodeusage_
+lib/munin/plugins/snmp__netstat
+lib/munin/plugins/snmp__print_pages
+lib/munin/plugins/snmp__print_supplies
+lib/munin/plugins/snmp__processes
+lib/munin/plugins/snmp__rdp_users
+lib/munin/plugins/snmp__sensors_fsc_bx_fan
+lib/munin/plugins/snmp__sensors_fsc_bx_temp
+lib/munin/plugins/snmp__sensors_fsc_fan
+lib/munin/plugins/snmp__sensors_fsc_temp
+lib/munin/plugins/snmp__sensors_mbm_fan
+lib/munin/plugins/snmp__sensors_mbm_temp
+lib/munin/plugins/snmp__sensors_mbm_volt
+lib/munin/plugins/snmp__swap
+lib/munin/plugins/snmp__uptime
+lib/munin/plugins/snmp__users
+lib/munin/plugins/snmp__winload
+lib/munin/plugins/snmp__winmem
+lib/munin/plugins/snort_alerts
+lib/munin/plugins/snort_bytes_pkt
+lib/munin/plugins/snort_drop_rate
+lib/munin/plugins/snort_pattern_match
+lib/munin/plugins/snort_pkts
+lib/munin/plugins/snort_traffic
+lib/munin/plugins/spamstats
+lib/munin/plugins/squeezebox_
+lib/munin/plugins/squid_cache
+lib/munin/plugins/squid_icp
+lib/munin/plugins/squid_objectsize
+lib/munin/plugins/squid_requests
+lib/munin/plugins/squid_traffic
+lib/munin/plugins/surfboard
+lib/munin/plugins/sybase_space
+lib/munin/plugins/tomcat_
+lib/munin/plugins/tomcat_access
+lib/munin/plugins/tomcat_jvm
+lib/munin/plugins/tomcat_threads
+lib/munin/plugins/tomcat_volume
+lib/munin/plugins/users
+lib/munin/plugins/varnish_
+lib/munin/plugins/vmstat
+lib/munin/plugins/zimbra_
+${PERL5_SUB_INSTALLVENDORLIB}/Munin/Node/Config.pm
+${PERL5_SUB_INSTALLVENDORLIB}/Munin/Node/Configure/Debug.pm
+${PERL5_SUB_INSTALLVENDORLIB}/Munin/Node/Configure/History.pm
+${PERL5_SUB_INSTALLVENDORLIB}/Munin/Node/Configure/HostEnumeration.pm
+${PERL5_SUB_INSTALLVENDORLIB}/Munin/Node/Configure/Plugin.pm
+${PERL5_SUB_INSTALLVENDORLIB}/Munin/Node/Configure/PluginList.pm
+${PERL5_SUB_INSTALLVENDORLIB}/Munin/Node/Logger.pm
+${PERL5_SUB_INSTALLVENDORLIB}/Munin/Node/OS.pm
+${PERL5_SUB_INSTALLVENDORLIB}/Munin/Node/SNMPConfig.pm
+${PERL5_SUB_INSTALLVENDORLIB}/Munin/Node/Server.pm
+${PERL5_SUB_INSTALLVENDORLIB}/Munin/Node/Service.pm
+${PERL5_SUB_INSTALLVENDORLIB}/Munin/Node/Session.pm
+${PERL5_SUB_INSTALLVENDORLIB}/Munin/Node/SpoolReader.pm
+${PERL5_SUB_INSTALLVENDORLIB}/Munin/Node/SpoolWriter.pm
+${PERL5_SUB_INSTALLVENDORLIB}/Munin/Node/Utils.pm
+${PERL5_SUB_INSTALLVENDORLIB}/Munin/Plugin.pm
+${PERL5_SUB_INSTALLVENDORLIB}/Munin/Plugin/Pgsql.pm
+${PERL5_SUB_INSTALLVENDORLIB}/Munin/Plugin/SNMP.pm
+man/man1/munin-get.1
+man/man1/munin-node-configure.1
+man/man1/munin-node.1
+man/man1/munin-run.1
+man/man1/munindoc.1
+man/man3/Munin::Node::Config.3
+man/man3/Munin::Node::Configure::Debug.3
+man/man3/Munin::Node::Configure::History.3
+man/man3/Munin::Node::Configure::HostEnumeration.3
+man/man3/Munin::Node::Configure::Plugin.3
+man/man3/Munin::Node::Configure::PluginList.3
+man/man3/Munin::Node::Logger.3
+man/man3/Munin::Node::OS.3
+man/man3/Munin::Node::SNMPConfig.3
+man/man3/Munin::Node::Server.3
+man/man3/Munin::Node::Service.3
+man/man3/Munin::Node::Session.3
+man/man3/Munin::Node::SpoolReader.3
+man/man3/Munin::Node::SpoolWriter.3
+man/man3/Munin::Node::Utils.3
+man/man3/Munin::Plugin.3
+man/man3/Munin::Plugin::Pgsql.3
+man/man3/Munin::Plugin::SNMP.3
+sbin/munin-node
+sbin/munin-node-configure
+sbin/munin-run
+share/examples/munin/munin-node.conf
+@pkgdir etc/munin/plugin-conf.d
+@pkgdir var/munin/plugin-state
diff --git a/munin-node/PLIST.AIX b/munin-node/PLIST.AIX
new file mode 100644
index 0000000000..cf68c14529
--- /dev/null
+++ b/munin-node/PLIST.AIX
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST.AIX,v 1.1 2019/09/09 12:21:44 tm Exp $
+lib/munin/plugins/swap
diff --git a/munin-node/PLIST.FreeBSD b/munin-node/PLIST.FreeBSD
new file mode 100644
index 0000000000..e1b7f4c9b4
--- /dev/null
+++ b/munin-node/PLIST.FreeBSD
@@ -0,0 +1,13 @@
+@comment $NetBSD: PLIST.FreeBSD,v 1.1 2019/09/09 12:21:44 tm Exp $
+lib/munin/plugins/coretemp
+lib/munin/plugins/cpu
+lib/munin/plugins/dev_cpu_
+lib/munin/plugins/if_
+lib/munin/plugins/if_errcoll_
+lib/munin/plugins/iostat
+lib/munin/plugins/load
+lib/munin/plugins/memory
+lib/munin/plugins/open_files
+lib/munin/plugins/swap
+lib/munin/plugins/systat
+lib/munin/plugins/uptime
diff --git a/munin-node/PLIST.Linux b/munin-node/PLIST.Linux
new file mode 100644
index 0000000000..4be359ebe9
--- /dev/null
+++ b/munin-node/PLIST.Linux
@@ -0,0 +1,52 @@
+@comment $NetBSD: PLIST.Linux,v 1.3 2022/04/04 11:46:02 jperkin Exp $
+lib/munin/plugins/acpi
+lib/munin/plugins/apt
+lib/munin/plugins/apt_all
+lib/munin/plugins/bonding_err_
+lib/munin/plugins/buddyinfo
+lib/munin/plugins/cps_
+lib/munin/plugins/cpu
+lib/munin/plugins/cpuspeed
+lib/munin/plugins/df_abs
+lib/munin/plugins/diskstat_
+lib/munin/plugins/diskstats
+lib/munin/plugins/entropy
+lib/munin/plugins/forks
+lib/munin/plugins/fw_conntrack
+lib/munin/plugins/fw_forwarded_local
+lib/munin/plugins/fw_packets
+lib/munin/plugins/if_
+lib/munin/plugins/if_err_
+lib/munin/plugins/interrupts
+lib/munin/plugins/iostat
+lib/munin/plugins/iostat_ios
+lib/munin/plugins/ip_
+lib/munin/plugins/irqstats
+lib/munin/plugins/load
+lib/munin/plugins/lpar_cpu
+lib/munin/plugins/meminfo
+lib/munin/plugins/memory
+lib/munin/plugins/netstat_multi
+lib/munin/plugins/nfs4_client
+lib/munin/plugins/nfs_client
+lib/munin/plugins/nfsd
+lib/munin/plugins/nfsd4
+lib/munin/plugins/open_files
+lib/munin/plugins/open_inodes
+lib/munin/plugins/port_
+lib/munin/plugins/proc
+lib/munin/plugins/proc_pri
+lib/munin/plugins/quota_usage_
+lib/munin/plugins/selinux_avcstat
+lib/munin/plugins/sensors_
+lib/munin/plugins/swap
+lib/munin/plugins/tcp
+lib/munin/plugins/threads
+lib/munin/plugins/uptime
+lib/munin/plugins/vlan_
+lib/munin/plugins/vlan_inetuse_
+lib/munin/plugins/vlan_linkuse_
+lib/munin/plugins/vserver_cpu_
+lib/munin/plugins/vserver_loadavg
+lib/munin/plugins/vserver_resources
+lib/munin/plugins/yum
diff --git a/munin-node/PLIST.NetBSD b/munin-node/PLIST.NetBSD
new file mode 100644
index 0000000000..00d199dc81
--- /dev/null
+++ b/munin-node/PLIST.NetBSD
@@ -0,0 +1,19 @@
+@comment $NetBSD: PLIST.NetBSD,v 1.1 2019/09/09 12:21:44 tm Exp $
+lib/munin/plugins/cpu
+lib/munin/plugins/forks
+lib/munin/plugins/if_
+lib/munin/plugins/if_errcoll_
+lib/munin/plugins/interrupts
+lib/munin/plugins/iostat
+lib/munin/plugins/iostat_ops
+lib/munin/plugins/irqstats
+lib/munin/plugins/load
+lib/munin/plugins/memory
+lib/munin/plugins/memory_pools
+lib/munin/plugins/memory_types
+lib/munin/plugins/nfs_client
+lib/munin/plugins/nfsd
+lib/munin/plugins/open_files
+lib/munin/plugins/sensors_
+lib/munin/plugins/swap
+lib/munin/plugins/uptime
diff --git a/munin-node/PLIST.SunOS b/munin-node/PLIST.SunOS
new file mode 100644
index 0000000000..2cbb62de66
--- /dev/null
+++ b/munin-node/PLIST.SunOS
@@ -0,0 +1,14 @@
+@comment $NetBSD: PLIST.SunOS,v 1.3 2022/04/04 11:46:02 jperkin Exp $
+lib/munin/plugins/cpu
+lib/munin/plugins/if_
+lib/munin/plugins/if_err_
+lib/munin/plugins/io_busy_
+lib/munin/plugins/io_bytes_
+lib/munin/plugins/io_ops_
+lib/munin/plugins/iostat
+lib/munin/plugins/load
+lib/munin/plugins/memory
+lib/munin/plugins/paging_in
+lib/munin/plugins/paging_out
+lib/munin/plugins/temperature
+lib/munin/plugins/uptime
diff --git a/munin-node/files/munin-node.sh b/munin-node/files/munin-node.sh
new file mode 100644
index 0000000000..e9c4ce5111
--- /dev/null
+++ b/munin-node/files/munin-node.sh
@@ -0,0 +1,61 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: munin-node.sh,v 1.5 2019/09/09 12:21:44 tm Exp $
+#
+# PROVIDE: munin-node
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# You will need to set some variables in /etc/rc.conf to start munin-node:
+#
+# munin_node=YES
+#
+
+if [ -f /etc/rc.subr ]
+then
+    . /etc/rc.subr
+fi
+
+name="munin_node"
+rcvar=$name
+command=@PREFIX@/sbin/munin-node
+command_interpreter=@PERL@
+pidfile="@VARBASE@/run/munin/munin-node.pid"
+required_files=@PKG_SYSCONFDIR@/munin-node.conf
+
+stop_cmd="munin_node_stop"
+
+# Net::Server breaks rc.subr's techniques for detecting whether the
+# process running at a certain PID is actually the process we wish to
+# stop.  Just unconditionally send SIGTERM to the PID instead.
+#
+munin_node_stop()
+{
+	@ECHO@ "Stopping ${name}."
+	if [ -f ${pidfile} ]; then
+		pid=`@HEAD@ -1 ${pidfile}`
+		doit="kill ${pid}"
+		if ! eval $doit && [ -z "$rc_force" ]; then
+			return 1
+		fi
+		wait_for_pids $pid
+	fi
+	@RM@ -f ${pidfile}
+}
+
+if [ ! -d @STATEDIR@ ]; then
+	mkdir @STATEDIR@
+	chown @MUNIN_USER@:@MUNIN_GROUP@ @STATEDIR@
+fi
+if [ ! -d @MUNIN_RUN@ ]; then
+	mkdir @MUNIN_RUN@
+	chown @MUNIN_USER@:@MUNIN_GROUP@ @MUNIN_RUN@
+fi
+
+if [ -f /etc/rc.subr ]; then
+	load_rc_config $name
+	run_rc_command "$1"
+else
+	echo -n " ${name}"
+	exec ${command} ${command_args}
+fi
diff --git a/munin-node/files/smf/manifest.xml b/munin-node/files/smf/manifest.xml
new file mode 100644
index 0000000000..0761ebaaf7
--- /dev/null
+++ b/munin-node/files/smf/manifest.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="munin">
+  <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
+    <create_default_instance enabled="false" />
+    <single_instance />
+    <dependency name="network" grouping="require_all" restart_on="error" type="service">
+      <service_fmri value="svc:/milestone/network:default" />
+    </dependency>
+    <dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
+      <service_fmri value="svc:/system/filesystem/local" />
+    </dependency>
+    <dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'>
+        <service_fmri value='file://@PKG_SYSCONFDIR@/munin-node.conf'/>
+    </dependency>
+    <method_context>
+      <method_environment>
+        <envvar name="PATH" value="@PREFIX@/bin:@PREFIX@/sbin:/usr/xpg4/bin:/usr/bin:/usr/sbin:/usr/sfw/bin:/usr/ccs/bin" />
+      </method_environment>
+    </method_context>
+    <exec_method type="method" name="start" exec="@PREFIX@/sbin/munin-node" timeout_seconds="60" />
+    <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
+    <property_group name="startd" type="framework">
+      <propval name="duration" type="astring" value="contract" />
+      <propval name="ignore_error" type="astring" value="core,signal" />
+    </property_group>
+    <property_group name="application" type="application">
+      <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/munin-node.conf" />
+    </property_group>
+    <stability value="Evolving" />
+    <template>
+      <common_name>
+        <loctext xml:lang="C">Munin node</loctext>
+      </common_name>
+    </template>
+  </service>
+</service_bundle>


Home | Main Index | Thread Index | Old Index