Add PAGER option

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep
2016-03-02 08:32:49 -08:00
parent 4e9f4742cb
commit 90d254f0c3
15 changed files with 115 additions and 13 deletions

View File

@ -316,6 +316,21 @@ get_config() {
g_loopback=$(find_loopback_interfaces)
if [ -n "$PAGER" -a -t 1 ]; then
case $PAGER in
/*)
g_pager="$PAGER"
[ -f "$g_pager" ] || fatal_error "PAGER $PAGER does not exist"
;;
*)
g_pager=$(mywhich pager 2> /dev/null)
[ -n "$g_pager" ] || fatal_error "PAGER $PAGER not found"
;;
esac
[ -x "$g_pager" ] || fatal_error "PAGER $g_pager is not executable"
fi
lib=$(find_file lib.cli-user)
[ -f $lib ] && . $lib