return 1;
}
-/*
- * read next line from stream
- *
- * \return error code
- */
-int glite_jppsbe_readline(
- glite_jp_context_t ctx,
- void *handle,
- void **b,
- char **line
-)
-{
- size_t maxlen, len, i;
- ssize_t nbytes;
- int retval, z, end;
- rl_buffer_t *buffer;
-
- if (!*b) *b = calloc(1,sizeof *buffer);
- buffer = *b;
-
- maxlen = BUFSIZ;
- i = 0;
- len = 0;
- *line = malloc(maxlen);
- end = 0;
-
- do {
- /* read next portion */
- if (buffer->pos >= buffer->size) {
- buffer->pos = 0;
- buffer->size = 0;
- if ((retval = glite_jppsbe_pread(ctx, handle, buffer->buf, BUFSIZ, buffer->offset, &nbytes)) == 0) {
- if (nbytes < 0) {
- retval = EINVAL;
- goto fail;
- } else {
- if (nbytes) {
- buffer->size = (size_t)nbytes;
- buffer->offset += nbytes;
- } else end = 1;
- }
- } else goto fail;
- }
-
- /* we have buffer->size - buffer->pos bytes */
- i = buffer->pos;
- do {
- if (i >= buffer->size) z = '\0';
- else {
- z = buffer->buf[i];
- if (z == '\n') z = '\0';
- }
- len++;
-
- if (!check_realloc_line(line, &maxlen, len)) {
- retval = ENOMEM;
- goto fail;
- }
- (*line)[len - 1] = z;
- i++;
- } while (z && i < buffer->size);
- buffer->pos = i;
- } while (len && (*line)[len - 1] != '\0');
-
- if ((!len || !(*line)[0]) && end) {
- free(*line);
- *line = NULL;
- }
-
- return 0;
-
-fail:
- free(*line);
- *line = NULL;
- return retval;
-}
char* glite_jpps_get_namespace(const char* attr){
char* namespace = strdup(attr);
+##############################################################################
+# Copyright (c) Members of the EGEE Collaboration. 2004.
+# See http://www.eu-egee.org/partners/ for details on the copyright
+# holders.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS
+# OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##############################################################################
+#
+# NAME : config_jpis
+#
+# DESCRIPTION : This function configures Job Provenance Index Server.
+#
+# AUTHORS : LB/JP team, heavily based on glite-yaim-lb
+#
+# NOTES :
+#
+# YAIM MODULE: glite-yaim-jpis
+#
+##############################################################################
+
+
function config_glite_jpis_check(){
requires MYSQL_PASSWORD
}
function config_glite_jpis() {
- #############################################
- # Logging and Bookkeeping configuration #
- #############################################
+ #################################################
+ # Job Provenance Index Server configuration #
+ #################################################
HOSTNAME=`hostname -f`
fi
GLITE_LOCATION_VAR=${GLITE_LOCATION_VAR:-/var/glite}
- mkdir -p $GLITE_LOCATION_VAR # Needed to store PID of LB server
+ mkdir -p $GLITE_LOCATION_VAR # Needed to store PID of JP IS server
chown $GLITE_USER:$GLITE_USER $GLITE_LOCATION_VAR
chmod 0755 $GLITE_LOCATION_VAR