[csw-devel] SF.net SVN: gar:[11622] csw/mgar/pkg/apache2/trunk/files/server.crt. build_cas

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Mon Nov 15 03:50:07 CET 2010


Revision: 11622
          http://gar.svn.sourceforge.net/gar/?rev=11622&view=rev
Author:   bdwalton
Date:     2010-11-15 02:50:06 +0000 (Mon, 15 Nov 2010)

Log Message:
-----------
apache2: a few minor tweaks to the server.crt key generation build CAS script

Modified Paths:
--------------
    csw/mgar/pkg/apache2/trunk/files/server.crt.build_cas

Modified: csw/mgar/pkg/apache2/trunk/files/server.crt.build_cas
===================================================================
--- csw/mgar/pkg/apache2/trunk/files/server.crt.build_cas	2010-11-15 02:39:29 UTC (rev 11621)
+++ csw/mgar/pkg/apache2/trunk/files/server.crt.build_cas	2010-11-15 02:50:06 UTC (rev 11622)
@@ -1,13 +1,14 @@
-# On installation, generate a dummy ssl certificate
+#!/bin/sh
 
+# On installation, generate a dummy ssl certificate (if required)
+
 PIR=${PKG_INSTALL_ROOT:-/}
 AP2_PREFIX=/opt/csw/apache2
 AP2_CONFDIR=$AP2_PREFIX/etc
 
 if [ "$1" = install ]; then
-    echo "A dummy file created during ${PKGINST} installation." > ${PIR}/$AP2_CONF/server.crt.CSW
     if [ ! -f $PIR/$AP2_CONFDIR/server.crt -a ! -f $PIR/$AP2_CONFDIR/server.key ]; then
-	echo Generating dummy ssl key and certificate...
+	echo Generating dummy ssl key and certificate... >&2
         # this is likely overkill for a dummy cert, but why not
 	umask 0077
 	cat <<EOF | /usr/sbin/chroot ${PIR} /opt/csw/bin/openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout $AP2_CONFDIR/server.key  -out $AP2_CONFDIR/server.crt >/dev/null 2>&1
@@ -16,12 +17,13 @@
 Hobbiton
 
 
-$hostname
+`hostname`
 bilbo at example.net
 
 
 EOF
     fi
 else
-    rm ${PIR}/$AP2_CONF/server.crt.CSW
+    # this is so that the build class picks up the file and re-instates it
+    cat ${PIR}/$AP2_CONF/server.crt
 fi


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