From a4682ceae6774956461edd03b2485bbacea445f4 Mon Sep 17 00:00:00 2001 From: mharmsen Date: Tue, 4 Oct 2011 01:17:41 +0000 Subject: Bugzilla Bug #688225 - (dogtagIPAv2.1) TRACKER: of the Dogtag fixes for freeIPA 2.1 git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/tags/IPA_v2_RHEL_6_2_20111003@2252 c9f7a03b-bd48-0410-a16d-cbbf54688b0b --- pki/base/native-tools/wrappers/bulkissuance.in | 76 ++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100755 pki/base/native-tools/wrappers/bulkissuance.in (limited to 'pki/base/native-tools/wrappers/bulkissuance.in') diff --git a/pki/base/native-tools/wrappers/bulkissuance.in b/pki/base/native-tools/wrappers/bulkissuance.in new file mode 100755 index 000000000..691cdf075 --- /dev/null +++ b/pki/base/native-tools/wrappers/bulkissuance.in @@ -0,0 +1,76 @@ +#!/bin/sh +# --- BEGIN COPYRIGHT BLOCK --- +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Copyright (C) 2007 Red Hat, Inc. +# All rights reserved. +# --- END COPYRIGHT BLOCK --- + + +############################################################################### +## (1) Specify variables used by this script. ## +############################################################################### + +LIB_DIR=@nss_libdir@:@nspr_libdir@ +BIN_DIR=@libexecdir@ +COMMAND=bulkissuance + + +############################################################################### +## (2) Set the LD_LIBRARY_PATH environment variable to determine the ## +## search order this command wrapper uses to find shared libraries. ## +############################################################################### + +LD_LIBRARY_PATH=${LIB_DIR} +export LD_LIBRARY_PATH + + +############################################################################### +## (3) Set the PATH environment variable to determine the search ## +## order this command wrapper uses to find binary executables. ## +## ## +## NOTE: Since the wrappers themselves are ALWAYS located in ## +## "/usr/bin", this directory will always be excluded ## +## from the search path. Since "/bin" is nothing more ## +## than a symbolic link to "/usr/bin" on Solaris, this ## +## directory will also always be excluded from the search ## +## path on this platform. ## +############################################################################### + +PATH=${BIN_DIR} +export PATH + + +############################################################################### +## (4) Execute the binary executable specified by this command wrapper ## +## based upon the preset LD_LIBRARY_PATH and PATH environment variables.## +############################################################################### + +ORIGINAL_IFS=${IFS} +IFS=: + +for dir in ${PATH} +do + if [ -x ${dir}/${COMMAND} ] + then + IFS=${ORIGINAL_IFS} + ${dir}/${COMMAND} "$@" + exit $? + fi +done + +echo "Unable to find \"${COMMAND}\" in \"${PATH}\"!" + +exit 255 + -- cgit