mirror of
https://github.com/dracutdevs/dracut.git
synced 2024-10-27 09:25:21 +03:00
c4da240717
The switch_root shell script did not work with bash-4.0-2, because "exec" gets the real path of the executable which is then "/sysroot/lib/ld-linux.so.2" instread of "./lib/ld-linux.so.2". Also the required chroot binary might live in /usr/bin, which can be mounted later. Here is the switch_root code from nash, which can be stripped down further, but which works. >From f1b1e4f8694104f007e4483c36b0bf40a5760167 Mon Sep 17 00:00:00 2001 From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Date: Wed, 4 Mar 2009 13:41:07 +0100 Subject: [PATCH] replace switch_root shell script with binary The switch_root shell script did not work with bash-4.0-2, because "exec" gets the real path of the executable which is then "/sysroot/lib/ld-linux.so.2" instead of "./lib/ld-linux.so.2". Also the required chroot binary might live in /usr/bin, which can be mounted later. Here is the switch_root code from nash, which can be stripped down further, but which works. |
||
---|---|---|
.. | ||
00dash | ||
10redhat-i18n | ||
40network | ||
90crypt | ||
90kernel-modules | ||
90lvm | ||
95debug | ||
95terminfo | ||
95udev-rules | ||
99base |