From 37d034580ad38d61f81559a5cd03d11b5468762a Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 12 Mar 2012 10:23:36 -0700 Subject: Use `pwd` in place of $PWD, treewide. The Autoconf manual says: Posix 1003.1-2001 requires that `cd' and `pwd' must update the `PWD' environment variable to point to the logical name of the current directory, but traditional shells do not support this. This can cause confusion if one shell instance maintains `PWD' but a subsidiary and different shell does not know about `PWD' and executes `cd'; in this case `PWD' points to the wrong directory. Use ``pwd`' rather than `$PWD'. so this commit replaces all uses of $PWD by `pwd`. Reported-by: Justin Pettit Signed-off-by: Ben Pfaff --- utilities/ovs-pki.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utilities/ovs-pki.in') diff --git a/utilities/ovs-pki.in b/utilities/ovs-pki.in index ac1de335..e79ecc62 100755 --- a/utilities/ovs-pki.in +++ b/utilities/ovs-pki.in @@ -178,7 +178,7 @@ if test -z "$dsaparam"; then fi case $log in /*) ;; - *) log="$PWD/$log" ;; + *) log=`pwd`/$log ;; esac logdir=$(dirname "$log") @@ -213,7 +213,7 @@ if test "$command" = "init"; then # Create the CAs. for ca in controllerca switchca; do echo "Creating $ca..." >&2 - oldpwd=$PWD + oldpwd=`pwd` mkdir -p $ca cd $ca -- cgit v1.2.3