[19506] trunk/dports/net/rancid/Portfile
source_changes at macosforge.org
source_changes at macosforge.org
Tue Sep 12 11:40:19 PDT 2006
Revision: 19506
Author: markd at macports.org
Date: 2006-09-12 11:40:17 -0700 (Tue, 12 Sep 2006)
Log Message:
-----------
No ticket. Correct paths and ui_msg for Looking Glass support.
Modified Paths:
--------------
trunk/dports/net/rancid/Portfile
Modified: trunk/dports/net/rancid/Portfile
===================================================================
--- trunk/dports/net/rancid/Portfile 2006-09-12 07:48:30 UTC (rev 19505)
+++ trunk/dports/net/rancid/Portfile 2006-09-12 18:40:17 UTC (rev 19506)
@@ -39,12 +39,16 @@
pre-configure {
+# Fix broken DESTDIR support
reinplace "s|@bindir@|${destroot}@bindir@|g" \
${worksrcpath}/Makefile.in ${worksrcpath}/bin/Makefile.in
reinplace "s|@sysconfdir@|${destroot}@sysconfdir@|g" \
${worksrcpath}/Makefile.in ${worksrcpath}/etc/Makefile.in
reinplace "s|@localstatedir@|${destroot}@localstatedir@|g" \
${worksrcpath}/Makefile.in
+# Set path for lg.conf.sample so Looking Glass will work
+ reinplace "s|@prefix@/bin|@prefix@/libexec/rancid:@prefix@/bin|g" \
+ ${worksrcpath}/etc/lg.conf.sample.in
}
configure.args --localstatedir=${prefix}/var/${name} \
@@ -73,15 +77,32 @@
To use the looking-glass service to run status check commands
(show ip route, show run, etc) against your devices from a web form:
-1) Copy lg.cgi and lgform.cgi to Apache's cgi-bin directory.
+1) Make an /lg folder in your Apache document root and copy lg files
+ sudo mkdir -p <Apache-directory>/lg/log
+ cd <Apache-directory>/lg
+ sudo cp ${prefix}/share/rancid/index.html ./
+ sudo cp ${prefix}/share/rancid/lgnotes.html ./
- cp ${prefix}/libexec/rancid/lg.cgi <Apache-directory>/cgi-bin/
- cp ${prefix}/libexec/rancid/lgform.cgi <Apache-directory>/cgi-bin/
+ Then the .cgi's
+ cp ${prefix}/libexec/rancid/lg.cgi ./
+ cp ${prefix}/libexec/rancid/lgform.cgi ./
-2) Customize the ${prefix}/etc/rancid/lg.conf looking glass configuration
+ Finally, set permissions. The rancid-user should also be the Apache user.
+ sudo chown -R <rancid-user>:<rancid-user> <Apache-directory>/lg
+
+
+2) To enable the cgi's in this directory to run, set this line in your httpd.conf:
+
+ <Directory /Library/WebServer/Documents/lg>
+ Options ExecCGI
+ </Directory>
+
+
+3) Customize the ${prefix}/etc/rancid/lg.conf looking glass configuration
file if desired.
-3) Goto url http://localhost/cgi-bin/lgform.cgi with a web browser to use
+
+4) Goto url http://localhost/cgi-bin/lgform.cgi with a web browser to use
the looking glass.
\n"
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20060912/d04a6951/attachment.html
More information about the macports-changes
mailing list