From 32b292e4068352b99d4130393c2ef149bd49de30 Mon Sep 17 00:00:00 2001 From: Junichi Uekawa Date: Tue, 30 Jan 2007 23:36:33 +0900 Subject: 406845: allow pbuilder-user-mode-linux to mount /lib/modules on the host --- pbuilder-user-mode-linux | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pbuilder-user-mode-linux') diff --git a/pbuilder-user-mode-linux b/pbuilder-user-mode-linux index 1085b02..41fe070 100755 --- a/pbuilder-user-mode-linux +++ b/pbuilder-user-mode-linux @@ -75,6 +75,12 @@ if ! mount -t ext2 /dev/ubdb ${UML_CHROOT_MOUNTPOINT}; then fi mount --bind ${UML_CHROOT_MOUNTPOINT}/dev /dev +# mount /lib/modules on the hostfs +kernel_modules=\$(sed -ne 's\$.*/lib/modules.*hostfs.*defaults,ro,\([^[:space:]]*\).*\$\1\$p' ${UML_CHROOT_MOUNTPOINT}/etc/fstab) +if [ -n "\${kernel_modules}" ] ; then + echo " -> Mount /lib/modules on the host \${kernel_modules}" + mount -t hostfs -o ro,\${kernel_modules} hostfs /lib/modules +fi export LOGNAME="${LOGNAME}" export HOME="${HOME}" @@ -133,6 +139,9 @@ 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 +if [ -n "\${kernel_modules}" ] ; then + umount /lib/modules +fi umount /dev umount ${UML_CHROOT_MOUNTPOINT} /sbin/halt -d -f -- cgit v1.2.3