Bug #4956
closedzonecfg won't use a valid pager
100%
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
Updated by Gary Mills over 8 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.
Updated by Electric Monk over 8 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>