rpi: Set resolv.conf at the end of the build
Functionally these are all the same, the one difference is the rpi3 because we build nexmon near the end, so we just put the new resolv.conf into the rsynced folder rather than in place before rsyncing.
This commit is contained in:
@@ -349,6 +349,11 @@ mount ${rootp} ${basedir}/root
|
||||
mkdir -p ${basedir}/root/boot
|
||||
mount ${bootp} ${basedir}/root/boot
|
||||
|
||||
# We do this down here to get rid of the build system's resolv.conf after running through the build.
|
||||
cat << EOF > kali-${architecture}/etc/resolv.conf
|
||||
nameserver 8.8.8.8
|
||||
EOF
|
||||
|
||||
echo "Rsyncing rootfs into image file"
|
||||
rsync -HPavz -q ${basedir}/kali-${architecture}/ ${basedir}/root/
|
||||
|
||||
|
||||
5
rpi.sh
5
rpi.sh
@@ -324,6 +324,11 @@ mount ${rootp} ${basedir}/root
|
||||
mkdir -p ${basedir}/root/boot
|
||||
mount ${bootp} ${basedir}/root/boot
|
||||
|
||||
# We do this down here to get rid of the build system's resolv.conf after running through the build.
|
||||
cat << EOF > kali-${architecture}/etc/resolv.conf
|
||||
nameserver 8.8.8.8
|
||||
EOF
|
||||
|
||||
echo "Rsyncing rootfs into image file"
|
||||
rsync -HPavz -q ${basedir}/kali-${architecture}/ ${basedir}/root/
|
||||
|
||||
|
||||
@@ -404,9 +404,18 @@ mount ${rootp} ${basedir}/root
|
||||
mkdir -p ${basedir}/root/boot
|
||||
mount ${bootp} ${basedir}/root/boot
|
||||
|
||||
# We do this down here to get rid of the build system's resolv.conf after running through the build.
|
||||
cat << EOF > kali-${architecture}/etc/resolv.conf
|
||||
nameserver 8.8.8.8
|
||||
EOF
|
||||
|
||||
echo "Rsyncing rootfs into image file"
|
||||
rsync -HPavz -q ${basedir}/kali-${architecture}/ ${basedir}/root/
|
||||
|
||||
# Build nexmon
|
||||
#LANG=C systemd-nspawn -M ${machine} -D ${basedir}/root/ /bin/bash -c "cd /root && gcc -Wall -shared -o libfakeuname.so fakeuname.c"
|
||||
#LANG=C systemd-nspawn -M ${machine} -D ${basedir}/root/ /bin/bash -c "LD_PRELOAD=/root/libfakeuname.so /root/buildnexmon.sh"
|
||||
|
||||
# Unmount partitions
|
||||
sync
|
||||
umount ${bootp}
|
||||
|
||||
@@ -415,6 +415,11 @@ mount ${rootp} ${basedir}/root
|
||||
mkdir -p ${basedir}/root/boot
|
||||
mount ${bootp} ${basedir}/root/boot
|
||||
|
||||
# We do this down here to get rid of the build system's resolv.conf after running through the build.
|
||||
cat << EOF > kali-${architecture}/etc/resolv.conf
|
||||
nameserver 8.8.8.8
|
||||
EOF
|
||||
|
||||
echo "Rsyncing rootfs into image file"
|
||||
rsync -HPavz -q ${basedir}/kali-${architecture}/ ${basedir}/root/
|
||||
|
||||
|
||||
5
rpi2.sh
5
rpi2.sh
@@ -319,6 +319,11 @@ mount ${rootp} ${basedir}/root
|
||||
mkdir -p ${basedir}/root/boot
|
||||
mount ${bootp} ${basedir}/root/boot
|
||||
|
||||
# We do this down here to get rid of the build system's resolv.conf after running through the build.
|
||||
cat << EOF > kali-${architecture}/etc/resolv.conf
|
||||
nameserver 8.8.8.8
|
||||
EOF
|
||||
|
||||
echo "Rsyncing rootfs into image file"
|
||||
rsync -HPavz -q ${basedir}/kali-${architecture}/ ${basedir}/root/
|
||||
|
||||
|
||||
@@ -470,7 +470,7 @@ LANG=C systemd-nspawn -M ${machine} -D ${basedir}/root/ /bin/bash -c "chmod 755
|
||||
rm -rf ${basedir}/root/root/{fakeuname.c,buildnexmon.sh,libfakeuname.so}
|
||||
|
||||
# We do this down here to get rid of the build system's resolv.conf after running through the build.
|
||||
cat << EOF > kali-${architecture}/etc/resolv.conf
|
||||
cat << EOF > ${basedir}/root/etc/resolv.conf
|
||||
nameserver 8.8.8.8
|
||||
EOF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user