secure_less.sh: fix in all environments
We don't install sudo in the initramfs image (as it also needs
pam libs and extra config files). Trying to use it just fails
with the error:
/usr/sbin/secure_less.sh: line 20: exec: sudo: not found
For now, check to see if sudo exists before we fallback to the
su command. Also add some documents as to why `su` broke in the
first place and caused the change to sudo.
BUG=None
TEST=using the pager in the initramfs works
Change-Id: I2db89394f54f33c13f31bc688c874ebccb6ef398
Reviewed-on: https://chromium-review.googlesource.com/384471
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Bowgo Tsai <bowgotsai@google.com>
1 file changed