]> git.proxmox.com Git - mirror_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>
Thu, 10 May 2018 22:03:23 +0000 (00:03 +0200)
commit332266dbd1b5edd5bc0af3b5a4bd52b62a992fa3
tree8e1472eb39db90d2a230da6d8c22902bc6a3feb6
parent3dc755e492093c42d0983620da810893c413c533
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>
debianpkg/backports/ubuntu14.04/debian/frr.postinst
debianpkg/frr.postinst