several random fixes need to rebase
This commit is contained in:
parent
b2d4d75686
commit
e2c20bf2cf
@ -11,6 +11,8 @@ set -o pipefail
|
|||||||
# activity, that's not how we're using these. Remove the setting, and the
|
# activity, that's not how we're using these. Remove the setting, and the
|
||||||
# comments about it
|
# comments about it
|
||||||
|
|
||||||
sed -i -e '/^Defaults\s*requiretty/d' -e '/Disable "ssh hostname/d' /etc/sudoers
|
if [[ -f /etc/sudoers ]]; then
|
||||||
sed -i -e '/You have to run/d' /etc/sudoers
|
sed -i -e '/^Defaults\s*requiretty/d' -e '/Disable "ssh hostname/d' /etc/sudoers
|
||||||
visudo -c
|
sed -i -e '/You have to run/d' /etc/sudoers
|
||||||
|
visudo -c
|
||||||
|
fi
|
||||||
|
@ -6,5 +6,7 @@ fi
|
|||||||
set -eu
|
set -eu
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
sed -i -e "/secure_path/ s@\([\'\"]\?\)\$@:/usr/local/bin/\1@" /etc/sudoers
|
if [[ -f /etc/sudoers ]]; then
|
||||||
visudo -c
|
sed -i -e "/secure_path/ s@\([\'\"]\?\)\$@:/usr/local/bin/\1@" /etc/sudoers
|
||||||
|
visudo -c
|
||||||
|
fi
|
||||||
|
@ -6,11 +6,6 @@ fi
|
|||||||
set -eu
|
set -eu
|
||||||
set -o pipefail
|
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
|
# exit directly if DIB_YUM_REPO_CONF is not defined properly
|
||||||
if [ -z "${DIB_YUM_REPO_CONF:-}" ] ; then
|
if [ -z "${DIB_YUM_REPO_CONF:-}" ] ; then
|
||||||
echo "DIB_YUM_REPO_CONF is not set - no repo configurations will be cleaned up"
|
echo "DIB_YUM_REPO_CONF is not set - no repo configurations will be cleaned up"
|
||||||
|
@ -7,9 +7,11 @@ set -eu
|
|||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
|
|
||||||
# if [[ -n ${DIB_YUM_DNF_CONTENTDIR:-''} ]]; then
|
if [[ -n ${DIB_YUM_DNF_CONTENTDIR:-''} ]]; then
|
||||||
# sudo sed -i 's,^#mirrorlist,mirrorlist,' -e 's,^baseurl,#baseurl,' /etc/yum.repos.d/rocky.repo
|
sudo mv /etc/dnf/vars/contentdir.bak /etc/dnf/vars/contentdir
|
||||||
# fi
|
sudo sed -i -e 's,^#mirrorlist,mirrorlist,' -e 's,^baseurl,#baseurl,' /etc/yum.repos.d/*.repo
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ ${YUM} == "dnf" ]]; then
|
if [[ ${YUM} == "dnf" ]]; then
|
||||||
cfg=/etc/dnf/dnf.conf
|
cfg=/etc/dnf/dnf.conf
|
||||||
|
@ -567,7 +567,7 @@ for X in ${!IMAGE_TYPES[@]} ; do
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
sudo tar -C ${TMP_BUILD_DIR}/mnt -cf $IMAGE_NAME.tar --exclude ./sys \
|
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
|
fi
|
||||||
sudo chown $USER: $IMAGE_NAME.${IMAGE_TYPES[$X]}
|
sudo chown $USER: $IMAGE_NAME.${IMAGE_TYPES[$X]}
|
||||||
unset IMAGE_TYPES[$X]
|
unset IMAGE_TYPES[$X]
|
||||||
|
Loading…
Reference in New Issue
Block a user