mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-03-15 06:48:10 +08:00
do not start pager when not on a tty.
This commit is contained in:
@@ -114,7 +114,7 @@ AC_CHECK_MEMBER([struct sockaddr.sa_len],
|
|||||||
|
|
||||||
AC_CHECK_HEADERS([net/if_tun.h linux/if_tun.h netinet/in_systm.h], [], [], [])
|
AC_CHECK_HEADERS([net/if_tun.h linux/if_tun.h netinet/in_systm.h], [], [], [])
|
||||||
|
|
||||||
AC_CHECK_FUNCS([setproctitle clock_gettime])
|
AC_CHECK_FUNCS([setproctitle clock_gettime isatty])
|
||||||
|
|
||||||
if [ test -z "$LIBWRAP" ];then
|
if [ test -z "$LIBWRAP" ];then
|
||||||
libwrap_enabled="no"
|
libwrap_enabled="no"
|
||||||
|
|||||||
@@ -45,6 +45,11 @@ FILE* pager_start(void)
|
|||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
|
||||||
|
#ifdef HAVE_ISATTY
|
||||||
|
if (isatty(STDOUT_FILENO) == 0)
|
||||||
|
return stdout;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!getenv("LESS")) {
|
if (!getenv("LESS")) {
|
||||||
setenv("LESS", "FRSX", 1);
|
setenv("LESS", "FRSX", 1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user