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

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Fri Oct 12 21:16:17 CEST 2012


Revision: 19431
          http://gar.svn.sourceforge.net/gar/?rev=19431&view=rev
Author:   bdwalton
Date:     2012-10-12 19:16:17 +0000 (Fri, 12 Oct 2012)
Log Message:
-----------
cswsslcert: remove a stray debug line, ensure we only generate new files if the .key file does not exist

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

Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswsslcert
===================================================================
--- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswsslcert	2012-10-12 16:17:22 UTC (rev 19430)
+++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswsslcert	2012-10-12 19:16:17 UTC (rev 19431)
@@ -35,7 +35,6 @@
 fi
 
 CAS_SSL_CONFIG=$PKG_INSTALL_ROOT/etc/opt/csw/cas-ssl.conf
-CAS_SSL_CONFIG=$PKG_INSTALL_ROOT/$PWD/cas-ssl.conf
 
 if [ -f "$CAS_SSL_CONFIG" ]; then
     debug_echo "Sourcing $CAS_SSL_CONFIG"
@@ -79,7 +78,10 @@
   fi
 
 
-  cat <<EOF | /usr/sbin/chroot ${PKG_INSTALL_ROOT} /opt/csw/bin/openssl $args >/dev/null 2>&1
+  if [ -f $dest.key ]; then
+      echo "Skipping key and cert/csr generation due to existing files."
+  else
+      cat <<EOF | /usr/sbin/chroot ${PKG_INSTALL_ROOT} /opt/csw/bin/openssl $args >/dev/null 2>&1
 ${SSL_COUNTRY}
 ${SSL_STATE}
 ${SSL_CITY}
@@ -89,10 +91,11 @@
 ${SSL_EMAIL}
 EOF
 
-  # we could bail here on $? != 0 but in the event there are multiple files we
-  # should at least attempt to generate them all.
-  if [ $? -ne 0 ]; then
-      echo "ERROR: There was a problem generating $dest.key/$dest.crt"
+     # we could bail here on $? != 0 but in the event there are
+     # multiple files we should at least attempt to generate them all.
+      if [ $? -ne 0 ]; then
+	  echo "ERROR: There was a problem generating $dest.key/$dest.crt"
+      fi
   fi
 done
 

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