Blob Blame History Raw
diff -ur voms-1.9.11.orig/src/install/voms_install_db.in voms-1.9.11/src/install/voms_install_db.in
--- voms-1.9.11.orig/src/install/voms_install_db.in	2009-07-16 15:10:40.000000000 +0200
+++ voms-1.9.11/src/install/voms_install_db.in	2009-08-26 17:45:39.608077295 +0200
@@ -4,7 +4,11 @@
 # Default prefix
 @LOCATION_ENV@=${@LOCATION_ENV@:-@LOCATION_DIR@}
 if test -z $@VAR_LOCATION_ENV@ ; then
-    @VAR_LOCATION_ENV@=$@LOCATION_ENV@/var
+    if [ "$@LOCATION_ENV@" = "/usr" ] ; then
+        @VAR_LOCATION_ENV@=/var
+    else
+        @VAR_LOCATION_ENV@=$@LOCATION_ENV@/var
+    fi
 fi
 
 # CERTDIR
@@ -37,7 +41,9 @@
 
 # Default path
 basepath=$@LOCATION_ENV@
-datapath=$@LOCATION_ENV@
+if [ "$@LOCATION_ENV@" != "/usr" ] ; then
+    datapath=$@LOCATION_ENV@
+fi
 
 # Default Suffix
 code=0
@@ -49,7 +55,7 @@
 logformat=""
 sqlloc=""
 help=""
-oldformat="no"
+newformat="yes"
 
 if test "x@with_mysqlconf@" != "x" ; then
     MYSQLCONF=" --defaults-file=@with_mysqlconf@ "
@@ -58,7 +64,7 @@
 fi
 
 
-TEMP=`getopt -o h --long mysql-home:,loglevel:,logtype:,logformat:,logdateformat:,oracle-home:,db:,port:,code:,voms-vo:,socktimeout:,db-type:,sqlloc:,db-admin:,db-pwd:,voms-name:,voms-pwd:,newformat,compat -n 'voms_install_db' -- "$@"`
+TEMP=`getopt -o h --long mysql-home:,loglevel:,logtype:,logformat:,logdateformat:,oracle-home:,db:,port:,code:,voms-vo:,socktimeout:,db-type:,sqlloc:,db-admin:,db-pwd:,voms-name:,voms-pwd:,oldformat,compat -n 'voms_install_db' -- "$@"`
 
 if [ $? != 0 ] ; then $ECHO "Terminating..." >&2 ; exit 1 ; fi
 
@@ -84,7 +90,7 @@
   --logtype)                logtype=$2                 ; shift 2 ;;
   --logformat)              logformat=$2               ; shift 2 ;;
   --logdateformat)          logdateformat=$2           ; shift 2 ;;
-  --newformat)              oldformat="yes"            ; shift 1 ;;
+  --oldformat)              newformat="no"             ; shift 1 ;;
   -h)                       help="yes"                 ; shift 1 ;;
 	--)                       shift                      ; break   ;;
 	*)                        $ECHO "$1: Internal Error!" >&2 ; exit 1  ;;
@@ -133,7 +139,7 @@
     $ECHO "    --logtype type          Specifies what to log. See the vomsd(8) man page for details."
     $ECHO "    --logformat format      See the vomsd(8) man page for details."
     $ECHO "    --logdateformat format  See the vomsd(8) man page for details."
-    $ECHO "    --newformat             Creates AC according to the old format."
+    $ECHO "    --oldformat             Creates AC according to the old format."
     $ECHO "    --help                  This output."
     exit 0;
 fi
@@ -261,8 +267,8 @@
 
 # Setting ownership and permission for voms_password_query file
 mkdir -p $datapath/etc/voms/$voms_vo
-mkdir -p $@LOCATION_ENV@_VAR/log
-#$datapath/log
+mkdir -p $@VAR_LOCATION_ENV@/log/voms
+
 $ECHO $voms_password_query > $datapath/etc/voms/$voms_vo/voms.pass
 chown root.voms $datapath/etc/voms/$voms_vo/voms.pass
 chmod 640 $datapath/etc/voms/$voms_vo/voms.pass
@@ -270,10 +276,10 @@
 if test -z $voms_vo ; then
     logname=voms
 else
-    logname=voms.$voms_vo
+    logname=$voms_vo
 fi
  
-$ECHO -en "--vo=$voms_vo\n--dbname=$voms_database\n--port=$port\n--username=$voms_username_query\n--passfile=$datapath/etc/voms/$voms_vo/voms.pass\n--sqlloc=$sqlloc\n--logfile=$@LOCATION_ENV@_VAR/log/$logname\n" > $datapath/etc/voms/$voms_vo/voms.conf
+$ECHO -en "--vo=$voms_vo\n--dbname=$voms_database\n--port=$port\n--username=$voms_username_query\n--passfile=$datapath/etc/voms/$voms_vo/voms.pass\n--sqlloc=$sqlloc\n--logfile=$@VAR_LOCATION_ENV@/log/voms/$logname\n" > $datapath/etc/voms/$voms_vo/voms.conf
 $ECHO -en "--socktimeout=$timeout\n--loglevel=$loglevel\n--logtype=$logtype\n" >>$datapath/etc/voms/$voms_vo/voms.conf
 
 if test "x$compat_mode" = "x-compat"; then