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

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Wed Oct 13 02:26:56 CEST 2010


Revision: 11280
          http://gar.svn.sourceforge.net/gar/?rev=11280&view=rev
Author:   bdwalton
Date:     2010-10-13 00:26:56 +0000 (Wed, 13 Oct 2010)

Log Message:
-----------
cswclassutils: ensure the two CAS scripts that use /var/opt/csw/cswclassutils create the dir if required

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

Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinetd
===================================================================
--- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinetd	2010-10-13 00:26:16 UTC (rev 11279)
+++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinetd	2010-10-13 00:26:56 UTC (rev 11280)
@@ -5,6 +5,8 @@
 # Written and maintained by Ben Walton
 #
 # 2009-10-02 Initial release
+# 2010-10-12 Update to ensure TMPDIR exists (Ben Walton)
+#
 
 # set DEBUG to any value to enable trace output
 DEBUG=
@@ -76,7 +78,9 @@
 
 	  manifest=$outdir/$svcname-$proto.xml
 
-	  TMPOUT=/var/opt/csw/cswclassutils/$svcname.$$
+	  TMPDIR=/var/opt/csw/cswclassutils
+	  [ -d "$TMPDIR" ] || mkdir -p "$TMPDIR"
+	  TMPOUT=$TMPDIR/$svcname.$$
 
 	  echo "$inetdsvc" > $TMPOUT
 

Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswpycompile
===================================================================
--- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswpycompile	2010-10-13 00:26:16 UTC (rev 11279)
+++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswpycompile	2010-10-13 00:26:56 UTC (rev 11280)
@@ -8,6 +8,7 @@
 #
 # 2009-05-25 First Release
 # 2009-10-14 Update to only compile package specific files (Ben Walton)
+# 2010-10-12 Update to ensure creation of TMPDIR  (Ben Walton)
 #
 
 # Force Path for the script to use
@@ -22,8 +23,11 @@
     echo PACKAGE: $PKGINST
 fi
 
-TMPPY=/var/opt/csw/cswclassutils/pycomp.$$.`date +%Y%m%d%H%M%S`.py
 
+TMPDIR=/var/opt/csw/cswclassutils
+[ -d "$TMPDIR" ] || mkdir -p "$TMPDIR"
+TMPPY=$TMPDIR/pycomp.$$.`date +%Y%m%d%H%M%S`.py
+
 cat <<EOF > $TMPPY
 import py_compile
 


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