1
0
mirror of synced 2026-04-14 15:34:20 +00:00

Mounts also /dev/pts automatically before running any hooks or rules

Closes Debian bug #588783.
This commit is contained in:
Axel Beckert
2010-08-03 15:51:33 +02:00
parent 03968fd18c
commit 73528d94e7
3 changed files with 16 additions and 4 deletions

View File

@@ -3619,7 +3619,7 @@ sub exportEnvironment
Run the xt-customise-system script to customize our fresh installation.
Before we do this we must pass all the relevant options into our
environment and mount /proc.
environment and mount /proc and /dev/pts.
=end doc
@@ -3637,6 +3637,17 @@ sub runCustomisationHooks
# 2. Mount
runCommand("mount -o bind /proc $MOUNT_POINT/proc");
#
# Before running any scripts we'll mount /dev/pts in the guest, too.
#
# 1. Make sure there is a directory.
mkdir( $MOUNT_POINT . "/dev", 0755 ) if ( !-d $MOUNT_POINT . "/dev" );
mkdir( $MOUNT_POINT . "/dev/pts", 0755 )
if ( !-d $MOUNT_POINT . "/dev/pts" );
# 2. Mount
runCommand("mount -t devpts devpts $MOUNT_POINT/dev/pts");
#
# Now update the environment for each defined IP address.
# these are handled specially since we use arrays.
@@ -3701,9 +3712,10 @@ sub runCustomisationHooks
}
#
# Unmount /proc in the guest install.
# Unmount /proc and /dev/pts in the guest install.
#
runCommand("umount $MOUNT_POINT/proc");
runCommand("umount $MOUNT_POINT/dev/pts");
}

2
debian/changelog vendored
View File

@@ -6,6 +6,8 @@ xen-tools (4.2~rc1-1) UNRELEASED; urgency=low
details.
- Uses the same 15-disable-hwclock hook for Debian as for Ubuntu DomUs
(Closes: #588880)
- Mounts not only /proc but also /dev/pts automatically before running
any customisation hooks (Closes: #588783)
* Bump Standards-Version to 3.9.1 (no changes)
-- Axel Beckert <abe@debian.org> Wed, 02 Jun 2010 18:10:34 +0200

View File

@@ -98,9 +98,7 @@ installDebianPackage ()
#
# Install the packages
#
mount -t devpts devpts ${prefix}/dev/pts
DEBIAN_FRONTEND=noninteractive chroot ${prefix} /usr/bin/apt-get --yes --force-yes install "$@"
umount ${prefix}/dev/pts
#
# Remove the policy-rc.d script.