From: Paul Park Date: Wed, 12 Jul 1995 18:59:38 +0000 (+0000) Subject: Correctly set LD_LIBRARY_PATH (again) X-Git-Tag: krb5-1.0-beta6~1527 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2d7601e8a0a5dc696402d1e5d87c49f0c41c61c9;p=krb5.git Correctly set LD_LIBRARY_PATH (again) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6290 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/tests/dejagnu/config/ChangeLog b/src/tests/dejagnu/config/ChangeLog index 3fb75c551..bf8c719ed 100644 --- a/src/tests/dejagnu/config/ChangeLog +++ b/src/tests/dejagnu/config/ChangeLog @@ -1,4 +1,8 @@ +Wed Jul 12 14:10:09 EDT 1995 Paul Park (pjpark@mit.edu) + * default.exp - Correctly set LD_LIBRARY_PATH. Also set it before + using RESOLVE. + Thu Jun 22 12:02:15 EDT 1995 Paul Park (pjpark@mit.edu) * default.exp - Change argument ordering for KDC. Realm must come last. diff --git a/src/tests/dejagnu/config/default.exp b/src/tests/dejagnu/config/default.exp index e80582e4d..f830a9d01 100644 --- a/src/tests/dejagnu/config/default.exp +++ b/src/tests/dejagnu/config/default.exp @@ -170,21 +170,42 @@ proc get_hostname { } { global hostname global localhostname global domain + global SHLIBDIR + global env if {[info exists hostname] && [info exists localhostname]} { return 1 } + if [info exists env(LD_LIBRARY_PATH)] { + set tmp_ldlib_path $env(LD_LIBRARY_PATH) + set env(LD_LIBRARY_PATH) "$SHLIBDIR:$env(LD_LIBRARY_PATH)" + } else { + catch "unset tmp_ldlib_path" + set env(LD_LIBRARY_PATH) "$SHLIBDIR" + } catch "exec $RESOLVE -q >tmpdir/hostname" exec_output if ![string match "" $exec_output] { send_log "$exec_output\n" verbose $exec_output send_error "ERROR: can't get hostname\n" + if [info exists tmp_ldlib_path] { + set env(LD_LIBRARY_PATH) $tmp_ldlib_path + } else { + catch "unset env(LD_LIBRARY_PATH)" + } + catch "unset tmp_ldlib_path" return 0 } set file [open tmpdir/hostname r] if { [ gets $file hostname ] == -1 } { send_error "ERROR: no output from hostname\n" + if [info exists tmp_ldlib_path] { + set env(LD_LIBRARY_PATH) $tmp_ldlib_path + } else { + catch "unset env(LD_LIBRARY_PATH)" + } + catch "unset tmp_ldlib_path" return 0 } close $file @@ -195,6 +216,12 @@ proc get_hostname { } { set localhostname [string tolower $localhostname] set domain [string tolower $domain] verbose "hostname: $hostname; localhostname: $localhostname; domain $domain" + if [info exists tmp_ldlib_path] { + set env(LD_LIBRARY_PATH) $tmp_ldlib_path + } else { + catch "unset env(LD_LIBRARY_PATH)" + } + catch "unset tmp_ldlib_path" return 1 } @@ -314,7 +341,7 @@ proc setup_kerberos_env { } { # Tell the dynamic loader where to get our shared libraries if [info exists env(LD_LIBRARY_PATH)] { set oldpath $env(LD_LIBRARY_PATH) - set env(LD_LIBRARY_PATH) "$SHLIBDIR $env(LD_LIBRARY_PATH)" + set env(LD_LIBRARY_PATH) "$SHLIBDIR:$env(LD_LIBRARY_PATH)" } else { catch "unset oldpath" set env(LD_LIBRARY_PATH) "$SHLIBDIR" @@ -981,7 +1008,7 @@ proc setup_root_shell { testname } { # Tell the dynamic loader where to get our shared libraries if [info exists env(LD_LIBRARY_PATH)] { set oldpath $env(LD_LIBRARY_PATH) - set env(LD_LIBRARY_PATH) "$SHLIBDIR $env(LD_LIBRARY_PATH)" + set env(LD_LIBRARY_PATH) "$SHLIBDIR:$env(LD_LIBRARY_PATH)" } else { catch "unset oldpath" set env(LD_LIBRARY_PATH) "$SHLIBDIR"