aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Percival <cperciva@FreeBSD.org>2020-02-11 04:05:45 +0000
committerColin Percival <cperciva@FreeBSD.org>2020-02-11 04:05:45 +0000
commit9f7cca9218bd3439dfe79d53e4d6baea9ef7fa8b (patch)
treea89022cfbbdeb5fc4ef0faa8ee7fb36675ab4ef3
parentd82420cbfce81ded27dd1debbf197a2235ec070d (diff)
downloadsrc-9f7cca9218bd3439dfe79d53e4d6baea9ef7fa8b.tar.gz
src-9f7cca9218bd3439dfe79d53e4d6baea9ef7fa8b.zip
Mount /dev while deinstalling pkg inside EC2 AMIs.
This gets rid of (harmless) warnings: "pkg: Cannot open /dev/null:No such file or directory". MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=357750
-rw-r--r--release/tools/ec2.conf2
1 files changed, 2 insertions, 0 deletions
diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf
index 176b98f7a2b0..98bb6694ac77 100644
--- a/release/tools/ec2.conf
+++ b/release/tools/ec2.conf
@@ -40,8 +40,10 @@ vm_extra_pre_umount() {
# catalogue and install or update pkg when the instance first
# launches, so these files would just be replaced anyway; removing
# them from the image allows it to boot faster.
+ mount -t devfs devfs ${DESTDIR}/dev
chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \
/usr/sbin/pkg delete -f -y pkg
+ umount ${DESTDIR}/dev
rm ${DESTDIR}/var/db/pkg/repo-*.sqlite
# The size of the EC2 root disk can be configured at instance launch