Skip to content

Commit

Permalink
It is better to backup resolv.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
ayufan committed Apr 5, 2020
1 parent 67fdd0a commit c06bdcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rootfs/make_rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ do_install() {
rm -f "$DEST/$FILE"
}

rm "$DEST/etc/resolv.conf"
mv "$DEST/etc/resolv.conf" "$DEST/etc/resolv.conf.bak"
cp /etc/resolv.conf "$DEST/etc/resolv.conf"

do_chroot apt-key add - < rootfs/ayufan-deb-ayufan-eu.gpg
Expand Down Expand Up @@ -301,7 +301,6 @@ do_chroot apt-get dist-upgrade -y
do_chroot systemctl enable ssh-keygen

sed -i 's|After=rc.local.service|#\0|;' "$DEST/lib/systemd/system/[email protected]"
do_chroot ln -s /run/resolvconf/resolv.conf /etc/resolv.conf
do_chroot apt-get clean

# Expire password
Expand All @@ -327,5 +326,6 @@ rm -f "$DEST/var/lib/dbus/machine-id"
rm -f "$DEST/etc/flash-kernel/machine"
: > "$DEST/etc/machine-id"
rm -f "$DEST/SHA256SUMS"
mv "$DEST/etc/resolv.conf.bak" "$DEST/etc/resolv.conf"

echo "Done - installed rootfs to $DEST"

0 comments on commit c06bdcf

Please sign in to comment.