From 9b93c0c613fb38187ee96608b846d5c82872bc88 Mon Sep 17 00:00:00 2001 From: Cody Shepherd Date: Wed, 12 Feb 2020 10:39:19 -0800 Subject: [PATCH] Properly setup the chroot before using the network in buildd hook. --- live-build/buildd/hooks/48-policy-rc-d.binary | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/live-build/buildd/hooks/48-policy-rc-d.binary b/live-build/buildd/hooks/48-policy-rc-d.binary index fb3c481b..5d3b73dc 100755 --- a/live-build/buildd/hooks/48-policy-rc-d.binary +++ b/live-build/buildd/hooks/48-policy-rc-d.binary @@ -1,7 +1,18 @@ #!/bin/sh + set -e # This is run after 02-disk-image-uefi.binary because # we don't want policyrcd-script-zg2 installed in # bootable images. + +. config/functions + +cleanup() { + teardown_mountpoint chroot +} +trap cleanup EXIT + +setup_mountpoint chroot + chroot chroot apt-get install -y policyrcd-script-zg2