diskimage-builder/diskimage_builder/elements/rpm-distro/pre-install.d/00-usr-local-bin-secure-path

13 lines
217 B
Plaintext
Raw Permalink Normal View History

#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
2023-11-21 21:28:47 +00:00
if [[ -f /etc/sudoers ]]; then
sed -i -e "/secure_path/ s@\([\'\"]\?\)\$@:/usr/local/bin/\1@" /etc/sudoers
visudo -c
fi