[csw-devel] SF.net SVN: gar:[6903] csw/mgar/pkg/cswclassutils/trunk/files/ CSWcswclassutils.i.cswmigrateconf

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Mon Oct 19 09:47:57 CEST 2009


Revision: 6903
          http://gar.svn.sourceforge.net/gar/?rev=6903&view=rev
Author:   wahwah
Date:     2009-10-19 07:47:57 +0000 (Mon, 19 Oct 2009)

Log Message:
-----------
cswmigrateconf: Fixed a bug in which the debug messages would always get printed, added 'give a chance to stop', made PKG_INSTALL_ROOT read only

Modified Paths:
--------------
    csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswmigrateconf

Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswmigrateconf
===================================================================
--- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswmigrateconf	2009-10-18 23:24:00 UTC (rev 6902)
+++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswmigrateconf	2009-10-19 07:47:57 UTC (rev 6903)
@@ -15,6 +15,7 @@
 set -u
 
 PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-/}
+readonly PKG_INSTALL_ROOT
 
 return_code=0
 
@@ -36,7 +37,7 @@
 if [ -r ${PKG_INSTALL_ROOT}etc/opt/csw/cswclassutils.DEBUG ]; then
   DEBUG=1
 else
-  DEBUG=
+  DEBUG=0
 fi
 
 give_a_chance_to_stop() {
@@ -81,7 +82,7 @@
 }
 
 debug() {
-  [ "${DEBUG}" ] & echo "$@"
+  [ "${DEBUG}" = "1" ] && echo "$@"
 }
 
 should_copy_archived_file() {
@@ -141,6 +142,10 @@
   # We're not sure if the files to be migrated have already been copied or not.
 
   cp "$confsrc" "$confdst"
+
+  cat "${confdst}"
+  give_a_chance_to_stop
+
   # Sourcing the file, it should contain the configuration.
   if [ -r "$confsrc" ]; then
     debug "Sourcing ${confsrc}"


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