diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-08-07 13:47:32 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-08-07 13:47:32 +0000 |
commit | a1b06a0aeaa34954e0cff6563779d1805d4e252a (patch) | |
tree | 0b3158c8c4c38a38d3d336ffc34d00deef8f12c0 /tools/drakx-in-chroot | |
parent | 9fa8fee1ab7c3a7ab8122aac0abf85ab8be3c681 (diff) | |
download | drakx-backup-do-not-use-a1b06a0aeaa34954e0cff6563779d1805d4e252a.tar drakx-backup-do-not-use-a1b06a0aeaa34954e0cff6563779d1805d4e252a.tar.gz drakx-backup-do-not-use-a1b06a0aeaa34954e0cff6563779d1805d4e252a.tar.bz2 drakx-backup-do-not-use-a1b06a0aeaa34954e0cff6563779d1805d4e252a.tar.xz drakx-backup-do-not-use-a1b06a0aeaa34954e0cff6563779d1805d4e252a.zip |
make drakx-in-chroot work with new libldetect:
- /sys must be mounted
- /lib/modules/<version>/modules.{dep,alias} are needed
nb: still need to modify drakx-installer-images
Diffstat (limited to 'tools/drakx-in-chroot')
-rw-r--r-- | tools/drakx-in-chroot | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/drakx-in-chroot b/tools/drakx-in-chroot index da1a45eca..ede763196 100644 --- a/tools/drakx-in-chroot +++ b/tools/drakx-in-chroot @@ -35,7 +35,7 @@ if (-d $SLASH_LOCATION) { rm_rf($SLASH_LOCATION); } -mkdir_p("$SLASH_LOCATION$_") foreach '/dev', '/dev/usb', '/etc', '/var', '/proc', $STAGE2_LOCATION_ROOTED, $MEDIA_LOCATION_ROOTED, $prefix_ROOTED; +mkdir_p("$SLASH_LOCATION$_") foreach '/dev', '/dev/usb', '/etc', '/var', '/proc', '/sys', $STAGE2_LOCATION_ROOTED, $MEDIA_LOCATION_ROOTED, $prefix_ROOTED; sys("$sudo rm -rf $dir") if $ENV{CLEAN}; -e $dir or sys("$sudo mkdir -p $dir"); @@ -56,6 +56,7 @@ if ($remote_repository) { sys("$sudo mount -o bind $dir $SLASH_LOCATION$prefix_ROOTED"); sys("$sudo mount -o bind $repository $SLASH_LOCATION$MEDIA_LOCATION_ROOTED") if !$remote_repository; sys("$sudo mount -t proc none $SLASH_LOCATION/proc"); +sys("$sudo mount -t sysfs none $SLASH_LOCATION/sys"); symlinkf('media', "$SLASH_LOCATION$IMAGE_LOCATION_ROOTED"); create_initial_symlinks(); create_initial_devices(); @@ -72,6 +73,13 @@ eval { cp_af($_, "$dir$_") } foreach qw(/dev/root); #- if the DISPLAY is remote, we may need to resolve the name: eval { cp_af($_, "$SLASH_LOCATION$_") } foreach qw(/etc/resolv.conf); +{ + chomp(my $kernel_version = `uname -r`); + my $dir = "/modules/$kernel_version"; + mkdir_p("$SLASH_LOCATION$dir"); + cp_af("/lib/$dir/modules.dep", "/lib/$dir/modules.alias", "$SLASH_LOCATION$dir"); +} + my $Xnest_pid; my $Xnest_bin = find { whereis_binary($_) } 'Xnest', 'Xephyr'; if (!-f ($SLASH_LOCATION . $AUTO_INSTALL_ROOTED) && $Xnest_bin) { |