[csw-devel] SF.net SVN: gar:[13247] csw/mgar/pkg/ntop/trunk

jonbcraig at users.sourceforge.net jonbcraig at users.sourceforge.net
Thu Feb 10 20:25:34 CET 2011


Revision: 13247
          http://gar.svn.sourceforge.net/gar/?rev=13247&view=rev
Author:   jonbcraig
Date:     2011-02-10 19:25:33 +0000 (Thu, 10 Feb 2011)

Log Message:
-----------
ntop: smoothing out user experience

Modified Paths:
--------------
    csw/mgar/pkg/ntop/trunk/Makefile
    csw/mgar/pkg/ntop/trunk/files/CSWntop.postinstall
    csw/mgar/pkg/ntop/trunk/files/CSWntop.postremove
    csw/mgar/pkg/ntop/trunk/files/CSWntop.request
    csw/mgar/pkg/ntop/trunk/files/cswntop

Modified: csw/mgar/pkg/ntop/trunk/Makefile
===================================================================
--- csw/mgar/pkg/ntop/trunk/Makefile	2011-02-10 18:00:06 UTC (rev 13246)
+++ csw/mgar/pkg/ntop/trunk/Makefile	2011-02-10 19:25:33 UTC (rev 13247)
@@ -46,8 +46,10 @@
 RUNTIME_DEP_PKGS_CSWntop += CSWlibgdbm3
 RUNTIME_DEP_PKGS_CSWntop += CSWzlib
 RUNTIME_DEP_PKGS_CSWntop += CSWiconv
-RUNTIME_DEP_PKGS_CSWntop += CSWgraphviz
 
+## Following package enables optional functionality
+#RUNTIME_DEP_PKGS_CSWntop += CSWgraphviz
+#CHECKPKG_OVERRIDES_CSWntop += surplus-dependency|CSWgraphviz
 
 BUILD_DEP_PKGS = $(RUNTIME_DEP_PKGS_CSWntop)
 BUILD_DEP_PKGS += CSWlibtool CSWautoconf CSWautomake
@@ -93,6 +95,7 @@
 CHECKPKG_OVERRIDES_CSWntop += shared-lib-pkgname-mismatch
 
 # Bad content files - Documentation
+CHECKPKG_OVERRIDES_CSWntop += file-with-bad-content|/usr/local|root/opt/csw/share/ntop/html/faq.html
 CHECKPKG_OVERRIDES_CSWntop += file-with-bad-content|/usr/share|root/opt/csw/share/ntop/html/faq.html
 CHECKPKG_OVERRIDES_CSWntop += file-with-bad-content|/usr/local|root/opt/csw/share/ntop/html/ntop.html
 CHECKPKG_OVERRIDES_CSWntop += file-with-bad-content|/usr/local|root/opt/csw/share/man/man8/ntop.8

Modified: csw/mgar/pkg/ntop/trunk/files/CSWntop.postinstall
===================================================================
--- csw/mgar/pkg/ntop/trunk/files/CSWntop.postinstall	2011-02-10 18:00:06 UTC (rev 13246)
+++ csw/mgar/pkg/ntop/trunk/files/CSWntop.postinstall	2011-02-10 19:25:33 UTC (rev 13247)
@@ -1,7 +1,7 @@
 #!/sbin/sh
 
-CONFDIR=$BASEDIR/etc/opt/csw/ntop
-DATADIR=$BASEDIR/var/opt/csw/ntop
+CONFDIR="${BASEDIR}etc/opt/csw/ntop"
+DATADIR="${BASEDIR}var/opt/csw/ntop"
 
 PATH=/bin:/usr/bin:/usr/sbin:"$PATH"
 export PATH
@@ -16,12 +16,9 @@
   mkdir -p $DATADIR
 fi
 
-if [ ! -d "$DATADIR/rrd" ]; then
-  echo "Making $DATADIR/rrd"
-  mkdir -p $DATADIR/rrd
-  chown nobody:nobody $DATADIR/rrd
-  chmod 0711 $DATADIR/rrd
-fi
+# Make sure directory permissions allow user nobody
+chown nobody:nobody $DATADIR
+chmod 0711 $DATADIR
 
 if [ ! -f "$DATADIR/ntop_pw.db" ]; then
   echo "Setting admin password"

Modified: csw/mgar/pkg/ntop/trunk/files/CSWntop.postremove
===================================================================
--- csw/mgar/pkg/ntop/trunk/files/CSWntop.postremove	2011-02-10 18:00:06 UTC (rev 13246)
+++ csw/mgar/pkg/ntop/trunk/files/CSWntop.postremove	2011-02-10 19:25:33 UTC (rev 13247)
@@ -1,7 +1,7 @@
 #!/sbin/sh
 
-CONFDIR=$BASEDIR/etc/opt/csw/ntop
-DATADIR=$BASEDIR/var/opt/csw/ntop
+CONFDIR="${BASEDIR}etc/opt/csw/ntop"
+DATADIR="${BASEDIR}var/opt/csw/ntop"
 
 if [ -d "$CONFDIR" -o -d "$DATADIR" ]; then
   echo ""

Modified: csw/mgar/pkg/ntop/trunk/files/CSWntop.request
===================================================================
--- csw/mgar/pkg/ntop/trunk/files/CSWntop.request	2011-02-10 18:00:06 UTC (rev 13246)
+++ csw/mgar/pkg/ntop/trunk/files/CSWntop.request	2011-02-10 19:25:33 UTC (rev 13247)
@@ -1,6 +1,7 @@
 #!/sbin/sh
 # 
-DATADIR=$BASEDIR/var/opt/csw/ntop
+CONFDIR="${BASEDIR}etc/opt/csw/ntop"
+DATADIR="${BASEDIR}var/opt/csw/ntop"
 
 if [ ! -f  $DATADIR/ntop_pw.db ]; then
  stty -echo

Modified: csw/mgar/pkg/ntop/trunk/files/cswntop
===================================================================
--- csw/mgar/pkg/ntop/trunk/files/cswntop	2011-02-10 18:00:06 UTC (rev 13246)
+++ csw/mgar/pkg/ntop/trunk/files/cswntop	2011-02-10 19:25:33 UTC (rev 13247)
@@ -61,10 +61,12 @@
 	if [ -z "$INTERFACES" ];then
 	 for i in `/sbin/ifconfig -a |/usr/bin/grep "^[a-z0-9]*:"`
           do
-           /usr/bin/echo $i | /usr/bin/grep "^[a-z0-9]*:" >/dev/null 2>&1       
+           # Only accept base interfaces (skip addtnl IPs)
+           /usr/bin/echo $i | /usr/bin/grep "^[a-z0-9]*:$" >/dev/null 2>&1       
            if [ $? -eq 1 ]; then
             continue
            fi
+           # Skip the localhost
            m=`/usr/bin/echo ${i} | /usr/bin/sed 's/:[0-9]*:*//'`
            if [ "$m" = "lo0" ]; then
             continue
@@ -72,20 +74,18 @@
            net_device_list="${net_device_list} ${m}"
           done
          net_device_list=`/usr/bin/echo $net_device_list | /usr/bin/sort -u`
-         interfaces=0;
-         set -- $net_device_list
-         for i
-         do
-          if [ ${interfaces} -gt 0 ]; then
-           INTERFACES="${i},${INTERFACES}"
-          else
-           INTERFACES="${i}"
+	 if [ ${net_device_list} ]; then
+           set -- $net_device_list
+	   INTERFACES="$1"
+	   shift;
+           for i
+           do
+            INTERFACES="$INTERFACES,${i}"
+           done
           fi
-          interfaces=`/usr/bin/expr ${interfaces} + 1`
-         done
-        fi
-	if [ ${interfaces} -gt 1 ]; then
-	 UNIXEXTRA=" ${UNIXEXTRA} -i ${INTERFACES}"
+	  if [ ${INTERFACES} ]; then
+	   UNIXEXTRA=" ${UNIXEXTRA} -i ${INTERFACES}"
+	  fi
 	fi
 	LOG=`/usr/bin/egrep "^\--use-syslog|^-L" "$CONF" | /usr/bin/cut -f2 -d" "`
 	if [ -z "$LOG" ];then


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list