Project

General

Profile

Actions

Bug #4956

closed

zonecfg won't use a valid pager

Added by Gary Mills over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2014-07-02
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

The zonecfg command pages the output from some commands, but this only works if the PAGER environment variable specifies a fully-qualified path name. Other commands don't have this requirement. Here's an example of the failure:


$ print $PAGER
pg
$ zonecfg -z tzone
WARNING: you do not have write access to this zone's configuration file;
going into read-only mode.
zonecfg:tzone> info net
PAGER pg does not exist (No such file or directory).
net:
address: 172.16.0.1/24
allowed-address not specified
physical: e1000g0
defrouter not specified
...
zonecfg:tzone> exit

Actions #1

Updated by Gary Mills over 7 years ago

  • % Done changed from 0 to 80

I have an adequate fix.

Actions #2

Updated by Gary Mills over 7 years ago

  • Assignee set to Gary Mills
  • % Done changed from 80 to 100

I've changed my approach. I've added a stat() equivalent that search PATH to check that the pager exists. It passes all my tests.

Actions #3

Updated by Electric Monk over 7 years ago

  • Status changed from New to Closed

git commit 944b13ecd074fe0d43ed6f80c816ca862c3cd6eb

commit  944b13ecd074fe0d43ed6f80c816ca862c3cd6eb
Author: Gary Mills <gary_mills@fastmail.fm>
Date:   2014-07-20T16:10:48.000Z

    4956 zonecfg won't use a valid pager
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Actions

Also available in: Atom PDF