From bceb2c3912346c0aab367014b04df0b43107a2ae Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 31 Oct 2008 13:51:24 -0700 Subject: [PATCH] Don't make ofp-pki --log option relative to log directory. That behavior may have made sense, but it was too surprising. --- utilities/ofp-pki.8.in | 5 ++--- utilities/ofp-pki.in | 14 +++++--------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/utilities/ofp-pki.8.in b/utilities/ofp-pki.8.in index f8bd4b157..58bee973e 100644 --- a/utilities/ofp-pki.8.in +++ b/utilities/ofp-pki.8.in @@ -309,9 +309,8 @@ directories. This option overrides this behavior. .TP \fB\-l\fR \fIfile\fR | \fB\-\^\-log=\fIfile\fR -Sets the log file to \fIfile\fR. If \fIfile\fR starts with \fB/\fR, -it is taken as an absolute path; otherwise it is relative to @LOGDIR@. -Default: \fBofp\-pki.log\fR. +Sets the log file to \fIfile\fR. Default: +\fB@LOGDIR@/ofp\-pki.log\fR. .TP \fB\-h\fR | \fB\-\^\-help\fR diff --git a/utilities/ofp-pki.in b/utilities/ofp-pki.in index 3d3a00de6..a6d4521a8 100755 --- a/utilities/ofp-pki.in +++ b/utilities/ofp-pki.in @@ -155,6 +155,10 @@ fi if test -z "$dsaparam"; then dsaparam=$pkidir/dsaparam.pem fi +case $log in + /*) ;; + *) $log="$PWD/$log" ;; +esac if test "$command" = "init"; then if test -e "$pkidir" && test "$force" != "yes"; then @@ -456,15 +460,7 @@ glob() { fi } -case $log in - /*) - exec 3>>$log || true - ;; - *) - exec 3>>$pkidir/$log || true - ;; -esac - +exec 3>>$log || true if test "$command" = req; then one_arg -- 2.45.2