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

jonbcraig at users.sourceforge.net jonbcraig at users.sourceforge.net
Sat Feb 12 23:59:17 CET 2011


Revision: 13265
          http://gar.svn.sourceforge.net/gar/?rev=13265&view=rev
Author:   jonbcraig
Date:     2011-02-12 22:59:17 +0000 (Sat, 12 Feb 2011)

Log Message:
-----------
ntop: fix install scripts

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

Modified: csw/mgar/pkg/ntop/trunk/files/CSWntop.postinstall
===================================================================
--- csw/mgar/pkg/ntop/trunk/files/CSWntop.postinstall	2011-02-12 17:32:33 UTC (rev 13264)
+++ csw/mgar/pkg/ntop/trunk/files/CSWntop.postinstall	2011-02-12 22:59:17 UTC (rev 13265)
@@ -1,30 +1,30 @@
 #!/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
 
-if [ ! -f "$CONFDIR/ntop.conf" ]; then
+if [ ! -f "${CONFDIR}/ntop.conf" ]; then
   echo "Installing CSWntop default config"
-  cp -p $CONFDIR/ntop.conf.CSW $CONFDIR/ntop.conf
+  cp -p ${CONFDIR}/ntop.conf.CSW ${CONFDIR}/ntop.conf
 fi
 
-if [ ! -d "$DATADIR" ]; then
-  echo "Making DATADIR $DATADIR"
-  mkdir -p $DATADIR
+if [ ! -d "${DATADIR}" ]; then
+  echo "Making DATADIR ${DATADIR}"
+  mkdir -p ${DATADIR}
 fi
 
 # Make sure directory permissions allow user nobody
-chown nobody:nobody $DATADIR
-chmod 0711 $DATADIR
+chown nobody:nobody ${DATADIR}
+chmod 0711 ${DATADIR}
 
-if [ ! -f "$DATADIR/ntop_pw.db" ]; then
+if [ ! -f "${DATADIR}/ntop_pw.db" ]; then
   echo "Setting admin password"
-  $BASEDIR/opt/csw/bin/ntop -P $DATADIR -u nobody --set-admin-password=$ADMIN_PW
+  ${BASEDIR}/opt/csw/bin/ntop -P ${DATADIR} -u nobody --set-admin-password=$ADMIN_PW
 else
-  echo "Keeping the existing $DATADIR/ntop_pw.db password."
+  echo "Keeping the existing ${DATADIR}/ntop_pw.db password."
 fi
 
 echo "\nURL to access ntop is http://hostname:3000"

Modified: csw/mgar/pkg/ntop/trunk/files/CSWntop.postremove
===================================================================
--- csw/mgar/pkg/ntop/trunk/files/CSWntop.postremove	2011-02-12 17:32:33 UTC (rev 13264)
+++ csw/mgar/pkg/ntop/trunk/files/CSWntop.postremove	2011-02-12 22:59:17 UTC (rev 13265)
@@ -1,15 +1,15 @@
 #!/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
+if [ -d "${CONFDIR}" -o -d "${DATADIR}" ]; then
   echo ""
   echo "You might want to manually remove files in:"
-  if [ -d "$CONFDIR" ]; then
-    echo "   $CONFDIR"
+  if [ -d "${CONFDIR}" ]; then
+    echo "   ${CONFDIR}"
   fi
-  if [ -d "$DATADIR" ]; then
-    echo "   $DATADIR"
+  if [ -d "${DATADIR}" ]; then
+    echo "   ${DATADIR}"
   fi
 fi

Modified: csw/mgar/pkg/ntop/trunk/files/CSWntop.request
===================================================================
--- csw/mgar/pkg/ntop/trunk/files/CSWntop.request	2011-02-12 17:32:33 UTC (rev 13264)
+++ csw/mgar/pkg/ntop/trunk/files/CSWntop.request	2011-02-12 22:59:17 UTC (rev 13265)
@@ -1,9 +1,9 @@
 #!/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 [ ! -f  $DATADIR/ntop_pw.db ]; then
+if [ ! -f  ${DATADIR}/ntop_pw.db ]; then
  stty -echo
  trap "stty echo ; echo 'Interrupted' ; exit 1" 1 2 3 15
  while [ true ]; do


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