From e05ce506e8824aa09809e88bd9104858faf64ce4 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 21 May 2013 21:35:35 +0200 Subject: copy-kmods.sh -> copy-initramfs.sh; do not copy kmods, just the initramfs for shutdown. --- dracut/copy-initramfs.sh | 6 ++++++ dracut/copy-kmods.sh | 12 ------------ dracut/module-setup.sh | 3 +-- 3 files changed, 7 insertions(+), 14 deletions(-) create mode 100644 dracut/copy-initramfs.sh delete mode 100644 dracut/copy-kmods.sh diff --git a/dracut/copy-initramfs.sh b/dracut/copy-initramfs.sh new file mode 100644 index 0000000..b5c43dc --- /dev/null +++ b/dracut/copy-initramfs.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +# Copy the initramfs back to the new rootfs for proper shutdown. +cp /run/initramfs/live/boot/initrd.lz $NEWROOT/boot/initramfs-${KVER}.img diff --git a/dracut/copy-kmods.sh b/dracut/copy-kmods.sh deleted file mode 100644 index a6b4b14..0000000 --- a/dracut/copy-kmods.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- -# ex: ts=8 sw=4 sts=4 et filetype=sh - -# Copy all modules from initramfs to new rootfs. -KVER=$(uname -r) -mkdir -p $NEWROOT/usr/lib/modules -cp -a /usr/lib/modules/$KVER/kernel/* $NEWROOT/usr/lib/modules/$KVER/kernel/ -depmod -b $NEWROOT/usr - -# Copy the initramfs back to the new rootfs for proper shutdown. -cp /run/initramfs/live/boot/initrd.lz $NEWROOT/boot/initramfs-${KVER}.img diff --git a/dracut/module-setup.sh b/dracut/module-setup.sh index 3ec42a9..61fac22 100644 --- a/dracut/module-setup.sh +++ b/dracut/module-setup.sh @@ -14,8 +14,7 @@ install() { inst /usr/bin/chroot inst /usr/bin/chmod inst /usr/bin/sed - inst /usr/sbin/depmod inst_hook pre-pivot 01 "$moddir/adduser.sh" inst_hook pre-pivot 02 "$moddir/display-manager-autologin.sh" - inst_hook pre-pivot 03 "$moddir/copy-kmods.sh" + inst_hook pre-pivot 03 "$moddir/copy-initramfs.sh" } -- cgit 1.4.1