[24984] trunk/dports/net/nedi

source_changes at macosforge.org source_changes at macosforge.org
Thu May 10 10:36:24 PDT 2007


Revision: 24984
          http://trac.macosforge.org/projects/macports/changeset/24984
Author:   markd at macports.org
Date:     2007-05-10 10:36:23 -0700 (Thu, 10 May 2007)

Log Message:
-----------
Add a startupitem for NeDi's syslog daemon, remove snmptrapd variant.

Modified Paths:
--------------
    trunk/dports/net/nedi/Portfile

Added Paths:
-----------
    trunk/dports/net/nedi/files/org.macports.nedisyslog.plist

Modified: trunk/dports/net/nedi/Portfile
===================================================================
--- trunk/dports/net/nedi/Portfile	2007-05-10 16:20:27 UTC (rev 24983)
+++ trunk/dports/net/nedi/Portfile	2007-05-10 17:36:23 UTC (rev 24984)
@@ -4,7 +4,7 @@
 
 name			nedi
 version			1.0.w
-revision		2
+revision		3
 categories		net
 maintainers		markd at macports.org
 platforms		darwin
@@ -43,9 +43,6 @@
 startupitem.name	nedimonitor
 startupitem.start	"${prefix}/share/${name}/moni.pl"
 
-variant snmptrapd {
-}
-
 use_configure		no
 patch {}
 build {}
@@ -93,16 +90,20 @@
 }
 
 pre-install {
-# MacPorts currently only supports one startupitem per portfile, and if the snmptrapd
-# variant was invoked that makes two.  So use the snmptrapd.plist file from filespath
-# and copy and link it as startupitem's do.
-	if { [variant_isset snmptrapd] } {
+# MacPorts can only create one startupitem per portfile.  So copy nedisyslog.plist and
+# snmptrapd.plist from filespath and copy and link it as startupitem's do.
+
+	file mkdir ${destroot}${prefix}/etc/LaunchDaemons/org.macports.nedisyslog/
+	file copy ${filespath}/org.macports.nedisyslog.plist \
+		${destroot}${prefix}/etc/LaunchDaemons/org.macports.nedisyslog/
+	system "cd /Library/LaunchDaemons && ln -sf \
+		${prefix}/etc/LaunchDaemons/org.macports.nedisyslog/org.macports.nedisyslog.plist"
+
 	file mkdir ${destroot}${prefix}/etc/LaunchDaemons/org.macports.snmptrapd/
 	file copy ${filespath}/org.macports.snmptrapd.plist \
 		${destroot}${prefix}/etc/LaunchDaemons/org.macports.snmptrapd/
 	system "cd /Library/LaunchDaemons && ln -sf \
 		${prefix}/etc/LaunchDaemons/org.macports.snmptrapd/org.macports.snmptrapd.plist"
-	}
 }
 
 post-activate {
@@ -110,20 +111,7 @@
 ui_msg "\n#### To complete the NeDi OS X installation ####
 
 
-1) Using NeDi as an SNMP trap receiver
-----------------------------------------------
--If you want to use NeDi to receive SNMP traps, you must install the NeDi port
- using the MacPorts variant +snmptrapd as shown:
-
-	sudo port install nedi +snmptrapd 
-
--If the snmptrapd variant was not used to install NeDi, remove NeDi so it can be reinstalled.
-
-	sudo port uninstall nedi
-	sudo port clean --all nedi
-
-
-2) Setup MySQL (for new installs)
+1) Setup MySQL (for new installs)
 -----------------------------------------------
 -Configure MySQL:
         sudo -u mysql ${prefix}/lib/mysql5/bin/mysql_install_db
@@ -135,14 +123,14 @@
    Follow the instructions that were given after you executed 'mysql_install_db' above.
 
 
-3) Install PHP5 with SNMP support and Apache 2
+2) Install PHP5 with SNMP support and Apache 2
 ------------------------------------------------
 	sudo port install php5 +apache2 +mysql5 +snmp
 
 	sudo ${prefix}/apache2/bin/apxs -a -e -n \"php5\" libphp5.so
 
 
-4) Turn on Apache 2
+3) Turn on Apache 2
 ------------------------------------------------
 -Turn off Apple's Apache 1.3 (Personal Web Sharing in System Preferences).  Then execute
  these commands:
@@ -156,7 +144,7 @@
 	sudo launchctl load -w /Library/LaunchdDaemons/org.macports.apache2.plist
 
 
-5) Configure NeDi, initialize database, and Login to NeDi
+4) Configure NeDi, initialize database, and Login to NeDi
 -----------------------------------------------
 -Set NeDi owner: sudo chown -R <nedi-user>:<nedi-group> ${prefix}/share/${name}/
 -Apache symlink: ln -s ${prefix}/share/${name}/html/  ${prefix}/apache2/htdocs/nedi
@@ -188,7 +176,7 @@
 	Initial user/pass is 'admin'/'admin'
 
 
-6) Discover Your Network with NeDi
+5) Discover Your Network with NeDi
 -----------------------------------------------
 -Edit nedi.conf Device Acc. variables: sudo pico ${prefix}/share/${name}/nedi.conf
 
@@ -208,18 +196,22 @@
 0 * * * * cd ${prefix}/share/${name} ; ./nedi.pl -c >> /dev/null 2>&1
 
 
-7) Set NeDi to receive device alerts and SNMP traps.  (optional)
+6) Set NeDi to receive device alerts, syslogs, and SNMP traps.  (optional)
 -----------------------------------------------
 -To enable NeDi alerts
 
 	sudo load lauchctl load -w /Library/LaunchDaemons/org.macports.nedimonitor.plist
 
--To enable the NeDi SNMP trap receiver: (See Step 1 about the +snmptrapd variant)
- Use the snmpconf Unix utility to create an snmptrapd.conf file with the entry:
+-To enable the NeDi syslog daemon:
 
+	sudo load lauchctl load -w /Library/LaunchDaemons/org.macports.nedisyslog.plist
+
+-To enable the NeDi SNMP trap receiver, first use the snmpconf Unix utility to create an
+ snmptrapd.conf file with the entry:
+
 	traphandle      default ${prefix}/share/nedi/trap.pl
 
--Then load the startup script to run the Unix snmptrapd daemon:
+ Then load the startup script to run the Unix snmptrapd daemon:
 
 	sudo load lauchctl load -w /Library/LaunchDaemons/org.macports.snmptrapd.plist
 \n"

Added: trunk/dports/net/nedi/files/org.macports.nedisyslog.plist
===================================================================
--- trunk/dports/net/nedi/files/org.macports.nedisyslog.plist	                        (rev 0)
+++ trunk/dports/net/nedi/files/org.macports.nedisyslog.plist	2007-05-10 17:36:23 UTC (rev 24984)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+        <key>Debug</key>
+        <false/>
+        <key>Label</key>
+        <string>org.macports.nedisyslog</string>
+        <key>OnDemand</key>
+        <false/>
+        <key>ProgramArguments</key>
+        <array>
+                <string>/opt/local/bin/daemondo</string>
+                <string>--label=nedisyslog</string>
+                <string>--start-cmd</string>
+                <string>/opt/local/etc/LaunchDaemons/org.macports.nedisyslog/nedisyslog.wrapper</string>
+                <string>start</string>
+                <string>;</string>
+                <string>--stop-cmd</string>
+                <string>/opt/local/etc/LaunchDaemons/org.macports.nedisyslog/nedisyslog.wrapper</string>
+                <string>stop</string>
+                <string>;</string>
+                <string>--restart-cmd</string>
+                <string>/opt/local/etc/LaunchDaemons/org.macports.nedisyslog/nedisyslog.wrapper</string>
+                <string>restart</string>
+                <string>;</string>
+                <string>--pid=none</string>
+        </array>
+        <key>RunAtLoad</key>
+        <false/>
+</dict>
+</plist>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070510/1bb637f2/attachment.html


More information about the macports-changes mailing list