several random fixes need to rebase

This commit is contained in:
Neil Hanlon 2023-11-21 16:28:47 -05:00
parent b2d4d75686
commit e2c20bf2cf
Signed by: neil
GPG Key ID: 705BC21EC3C70F34
5 changed files with 15 additions and 14 deletions

View File

@ -11,6 +11,8 @@ set -o pipefail
# activity, that's not how we're using these. Remove the setting, and the
# comments about it
if [[ -f /etc/sudoers ]]; then
sed -i -e '/^Defaults\s*requiretty/d' -e '/Disable "ssh hostname/d' /etc/sudoers
sed -i -e '/You have to run/d' /etc/sudoers
visudo -c
fi

View File

@ -6,5 +6,7 @@ fi
set -eu
set -o pipefail
if [[ -f /etc/sudoers ]]; then
sed -i -e "/secure_path/ s@\([\'\"]\?\)\$@:/usr/local/bin/\1@" /etc/sudoers
visudo -c
fi

View File

@ -6,11 +6,6 @@ fi
set -eu
set -o pipefail
if [[ -n ${DIB_YUM_DNF_CONTENTDIR:-''} ]]; then
sudo mv /etc/dnf/vars/contentdir.bak /etc/dnf/vars/contentdir
sudo sed -i -e 's,^#mirrorlist,mirrorlist,' -e 's,^baseurl,#baseurl,' /etc/yum.repos.d/*.repo
fi
# exit directly if DIB_YUM_REPO_CONF is not defined properly
if [ -z "${DIB_YUM_REPO_CONF:-}" ] ; then
echo "DIB_YUM_REPO_CONF is not set - no repo configurations will be cleaned up"

View File

@ -7,9 +7,11 @@ set -eu
set -o pipefail
# if [[ -n ${DIB_YUM_DNF_CONTENTDIR:-''} ]]; then
# sudo sed -i 's,^#mirrorlist,mirrorlist,' -e 's,^baseurl,#baseurl,' /etc/yum.repos.d/rocky.repo
# fi
if [[ -n ${DIB_YUM_DNF_CONTENTDIR:-''} ]]; then
sudo mv /etc/dnf/vars/contentdir.bak /etc/dnf/vars/contentdir
sudo sed -i -e 's,^#mirrorlist,mirrorlist,' -e 's,^baseurl,#baseurl,' /etc/yum.repos.d/*.repo
fi
if [[ ${YUM} == "dnf" ]]; then
cfg=/etc/dnf/dnf.conf

View File

@ -567,7 +567,7 @@ for X in ${!IMAGE_TYPES[@]} ; do
fi
else
sudo tar -C ${TMP_BUILD_DIR}/mnt -cf $IMAGE_NAME.tar --exclude ./sys \
--exclude ./proc --xattrs --xattrs-include=\* .
--exclude ./proc --exclude ./dev/* --xattrs --xattrs-include=\* .
fi
sudo chown $USER: $IMAGE_NAME.${IMAGE_TYPES[$X]}
unset IMAGE_TYPES[$X]