All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] less: set PAGER variable
@ 2019-09-02 13:39 Lubomir Rintel
  2019-09-03  8:38 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Lubomir Rintel @ 2019-09-02 13:39 UTC (permalink / raw)
  To: buildroot

The system/skeleton/etc/profile sets PAGER to /bin/more. Not sure why,
but this defeats pager autodetection by various tool (systemctl, nmcli,
etc.) that would otherwise prefer less to more.

Let's override the PAGER variable if the user chooses to install the less
package.
---
 package/less/less.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/less/less.mk b/package/less/less.mk
index ef3643c0aa..1981e4b8b6 100644
--- a/package/less/less.mk
+++ b/package/less/less.mk
@@ -12,6 +12,8 @@ LESS_DEPENDENCIES = ncurses
 
 define LESS_INSTALL_TARGET_CMDS
 	$(INSTALL) -m 0755 $(@D)/less $(TARGET_DIR)/usr/bin/less
+	mkdir -p $(TARGET_DIR)/etc/profile.d
+	echo "export PAGER='/bin/less'" > $(TARGET_DIR)/etc/profile.d/less.sh
 endef
 
 $(eval $(autotools-package))
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-06  9:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-02 13:39 [Buildroot] [PATCH] less: set PAGER variable Lubomir Rintel
2019-09-03  8:38 ` Thomas Petazzoni
2019-09-06  9:24   ` Lubomir Rintel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.