diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2014-10-09 10:49:02 +0200 |
---|---|---|
committer | Pascal Terjan <pterjan@gmail.com> | 2014-10-20 21:29:57 +0000 |
commit | 1a213f9497330c3173500e4e27d0e21a694beba4 (patch) | |
tree | 8b5437737f4f939eba4e1f75938e145fc467c769 /tools/drakx-in-chroot | |
parent | 1f921b90cff06de45a9f5150f647de9fcfba1396 (diff) | |
download | drakx-1a213f9497330c3173500e4e27d0e21a694beba4.tar drakx-1a213f9497330c3173500e4e27d0e21a694beba4.tar.gz drakx-1a213f9497330c3173500e4e27d0e21a694beba4.tar.bz2 drakx-1a213f9497330c3173500e4e27d0e21a694beba4.tar.xz drakx-1a213f9497330c3173500e4e27d0e21a694beba4.zip |
adapt to the fact that stage2 expects a /dev fully populated by udev
Diffstat (limited to 'tools/drakx-in-chroot')
-rwxr-xr-x | tools/drakx-in-chroot | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/drakx-in-chroot b/tools/drakx-in-chroot index af1e51c1c..47a760b0e 100755 --- a/tools/drakx-in-chroot +++ b/tools/drakx-in-chroot @@ -85,6 +85,7 @@ sys("$sudo mount -o bind $dir $SLASH_LOCATION$prefix_ROOTED"); $repository_uri ||= $repository_without_arch if !$remote_repository; sys("$sudo mount -o bind $repository_uri $SLASH_LOCATION$MEDIA_LOCATION_ROOTED") if $repository_uri; +sys("$sudo mount --bind /dev $SLASH_LOCATION/dev"); sys("$sudo mount -t proc none $SLASH_LOCATION/proc"); sys("$sudo mount -t sysfs none $SLASH_LOCATION/sys"); sys("$sudo mount -t debugfs none $SLASH_LOCATION/sys/kernel/debug"); @@ -109,7 +110,6 @@ if ($disk_iso_repository) { symlinkf('media' . $repository_arch, "$SLASH_LOCATION$IMAGE_LOCATION_ROOTED"); create_initial_symlinks(); -create_initial_devices(); apply_stage2_updates(); @@ -197,14 +197,10 @@ sub create_initial_symlinks() { } } -sub create_initial_devices() { - sys("$sudo cp -a /dev/{mem,null,random,urandom,tty} $SLASH_LOCATION/dev"); -} - sub umount_all() { my $err; clean_stage2_updates(); - my @procs = ('/proc', '/sys/kernel/debug', '/sys', '/run/udev', '/run/blkid', '/run/initramfs', '/run'); + my @procs = (qw(/dev /proc /sys/kernel/debug /sys /run/udev /run/blkid /run/initramfs /run)); foreach ((map { "$prefix_ROOTED$_" } @procs, '/dev', ''), @procs, $STAGE2_LOCATION_ROOTED, $LOOP_MOUNT_POINT, $MEDIA_LOCATION_ROOTED, $IMAGE_LOCATION_ROOTED) { my $dir = "$SLASH_LOCATION$_"; rmdir $dir; |