refator(image): commented and moved symlinks inside SKIP_DRIVER_LOADER check

Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
This commit is contained in:
Frederico Araujo 2022-03-22 11:25:25 -04:00 committed by poiana
parent 55700f80e4
commit 26a3b7a01e

View File

@ -16,13 +16,15 @@
# limitations under the License.
#
rm -fr /usr/src/kernels/ && rm -fr /usr/src/debug/
rm -fr /lib/modules && ln -s $HOST_ROOT/lib/modules /lib/modules
rm -fr /boot && ln -s $HOST_ROOT/boot /boot
# Set the SKIP_DRIVER_LOADER variable to skip loading the driver
if [[ -z "${SKIP_DRIVER_LOADER}" ]]; then
# Required by dkms to find the required dependencies on RedHat UBI
rm -fr /usr/src/kernels/ && rm -fr /usr/src/debug/
rm -fr /lib/modules && ln -s $HOST_ROOT/lib/modules /lib/modules
rm -fr /boot && ln -s $HOST_ROOT/boot /boot
echo "* Setting up /usr/src links from host"
for i in "$HOST_ROOT/usr/src"/*