From: Ben Pfaff Date: Fri, 31 Oct 2008 20:51:24 +0000 (-0700) Subject: Don't make ofp-pki --log option relative to log directory. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bceb2c3912346c0aab367014b04df0b43107a2ae;p=openvswitch Don't make ofp-pki --log option relative to log directory. That behavior may have made sense, but it was too surprising. --- diff --git a/utilities/ofp-pki.8.in b/utilities/ofp-pki.8.in index f8bd4b15..58bee973 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 3d3a00de..a6d4521a 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