From 1b0e726f0edc9d474a6245a2a55b317ab9ac3fc9 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Thu, 15 Oct 2015 14:05:53 +0000 Subject: uml: stop networking before quitting, so that the whole thing can exit properly Closes: #416918 Thanks: Paul TBBle Hampson for the patch --- pbuilder-user-mode-linux | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pbuilder-user-mode-linux b/pbuilder-user-mode-linux index 48ce023..1e940dc 100755 --- a/pbuilder-user-mode-linux +++ b/pbuilder-user-mode-linux @@ -150,6 +150,17 @@ else fi pbuilder "$1" ${UML_EXTRAOPT} \${EXTRAOPT[@]} --buildresult "\${BUILDRESULT}" --buildplace "${UML_CHROOT_MOUNTPOINT}" --internal-build-uml ${UML_DEBUGMODE:+--debug} ${BUILDING_DSC_FILE} ${UML_EXECUTE_EXTRAOPT} echo \$? > /proc/exitcode +cat < ${UML_CHROOT_MOUNTPOINT}/tmp/chrootshell +#! /bin/bash +${UML_DEBUGMODE} +# the shell executed inside chroot inside UML + echo Stopping network inside the chroot + mount -t proc /proc /proc + /etc/init.d/networking stop + umount /proc +SHELL +chmod a+x ${UML_CHROOT_MOUNTPOINT}/tmp/chrootshell +chroot ${UML_CHROOT_MOUNTPOINT} /tmp/chrootshell if [ -n "\${kernel_modules}" ] ; then umount /lib/modules -- cgit v1.2.3