]> git.puffer.fish Git - matthieu/frr.git/commit
debianpkg: improve VTYSH_PAGER environment check
authorPascal Mathis <mail@pascalmathis.com>
Thu, 10 May 2018 22:03:23 +0000 (00:03 +0200)
committerPascal Mathis <mail@pascalmathis.com>
Tue, 29 May 2018 18:07:33 +0000 (20:07 +0200)
commit279dde85ba320ac7b724297dc906856749190ad8
tree4da5faa5e54b3090e88d6ff955406632edc1d149
parentd27a91dc564d113ce38715c35b8514a6562aef57
debianpkg: improve VTYSH_PAGER environment check

The current post-installation scripts for all Debian packages execute
grep 'VTYSH_PAGER=/bin/cat' to check if the VTYSH_PAGER variable is
present within /etc/environment.

While presence of that environment variable should be checked, the
current implementation does not handle this line being a comment (and
therefor not active) or the user picking a different VTYSH_PAGER than
/bin/cat.

This commit ensures that the environment variable can be freely changed
by the user, while still guaranteeing that it is present in the file
without being a comment.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
(cherry picked from commit 332266dbd1b5edd5bc0af3b5a4bd52b62a992fa3)
debianpkg/backports/ubuntu14.04/debian/frr.postinst
debianpkg/frr.postinst