enable network access for the chroot, always
This commit is contained in:
parent
041f5bc97d
commit
1c48b6a633
@ -1,8 +1,8 @@
|
|||||||
%post
|
%post
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
echo "Packages within this disk image"
|
# Remove the temporary 'resolv.conf' file so that the user defines it
|
||||||
rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' | sort -rn
|
rm -v -f /etc/resolv.conf
|
||||||
|
|
||||||
# Remove all network connections and/or links
|
# Remove all network connections and/or links
|
||||||
rm -v -f /etc/sysconfig/network-scripts/ifcfg-link
|
rm -v -f /etc/sysconfig/network-scripts/ifcfg-link
|
||||||
|
@ -1,16 +1,10 @@
|
|||||||
%post
|
%post
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
# Setup networking temporarily
|
|
||||||
[ -f /etc/resolv.conf ] || echo "nameserver 1.1.1.1" > /etc/resolv.conf
|
|
||||||
|
|
||||||
# The script that expands root partition
|
# The script that expands root partition
|
||||||
[ -d /usr/local/bin ] || mkdir --verbose /usr/local/bin
|
[ -d /usr/local/bin ] || mkdir --verbose /usr/local/bin
|
||||||
curl 'https://git.thefossguy.com/enterprise-linux/sbc-images/raw/branch/rocky-generic/scripts/expand-rootfs.sh' --output /usr/local/bin/expand-rootfs.sh || exit 1
|
curl 'https://git.thefossguy.com/enterprise-linux/sbc-images/raw/branch/rocky-generic/scripts/expand-rootfs.sh' --output /usr/local/bin/expand-rootfs.sh || exit 1
|
||||||
[ -f /usr/local/bin/expand-rootfs.sh ] && \
|
[ -f /usr/local/bin/expand-rootfs.sh ] && \
|
||||||
chmod --verbose +x /usr/local/bin/expand-rootfs.sh
|
chmod --verbose +x /usr/local/bin/expand-rootfs.sh
|
||||||
|
|
||||||
# Remove the temporary 'resolv.conf' file
|
|
||||||
rm -v -f /etc/resolv.conf
|
|
||||||
|
|
||||||
%end
|
%end
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
# enable network access in the chroot
|
||||||
|
[ -f /etc/resolv.conf ] || echo "nameserver 1.1.1.1" > /etc/resolv.conf
|
||||||
|
|
||||||
%include grub-setup.ksi
|
%include grub-setup.ksi
|
||||||
%include rpm-repos-enable.ksi
|
%include rpm-repos-enable.ksi
|
||||||
%include user-setup.ksi
|
%include user-setup.ksi
|
||||||
|
@ -4,9 +4,6 @@ set -x
|
|||||||
MACHINE_ARCH="$(uname -m)"
|
MACHINE_ARCH="$(uname -m)"
|
||||||
DNF_RELEASEVER="$(dnf config-manager --dump-variables | grep 'releasever' | awk '{print $3}')"
|
DNF_RELEASEVER="$(dnf config-manager --dump-variables | grep 'releasever' | awk '{print $3}')"
|
||||||
|
|
||||||
# Setup networking temporarily
|
|
||||||
[ -f /etc/resolv.conf ] || echo "nameserver 1.1.1.1" > /etc/resolv.conf
|
|
||||||
|
|
||||||
# This repository is a given since it provides 'uboot-images-armv8' and
|
# This repository is a given since it provides 'uboot-images-armv8' and
|
||||||
# 'uboot-tools', which are **required**.
|
# 'uboot-tools', which are **required**.
|
||||||
dnf config-manager --assumeyes --add-repo "https://download.rockylinux.org/pub/sig/${DNF_RELEASEVER}/altarch/${MACHINE_ARCH}/altarch-common"
|
dnf config-manager --assumeyes --add-repo "https://download.rockylinux.org/pub/sig/${DNF_RELEASEVER}/altarch/${MACHINE_ARCH}/altarch-common"
|
||||||
@ -56,7 +53,5 @@ echo 'metadata_expire=2400' | tee -a '/etc/yum.repos.d/_copr:copr.fedorainfraclo
|
|||||||
dnf clean expire-cache
|
dnf clean expire-cache
|
||||||
dnf upgrade -y
|
dnf upgrade -y
|
||||||
|
|
||||||
# Remove the temporary 'resolv.conf' file
|
|
||||||
rm -v -f /etc/resolv.conf
|
|
||||||
|
|
||||||
%end
|
%end
|
||||||
|
Loading…
Reference in New Issue
Block a user