diff options
author | Max Rees <maxcrees@me.com> | 2020-07-11 01:19:52 -0500 |
---|---|---|
committer | Max Rees <maxcrees@me.com> | 2020-07-11 23:47:51 -0500 |
commit | 77a32d089abcb5f43da122e4b97575e671213457 (patch) | |
tree | 6b56008ebcb8bdb328168ae74f1bbd9fc247684d /user/dracut/dracut.easy-boot | |
parent | a444a46387483758bb8d75cf16d48db6b7876cff (diff) | |
download | packages-77a32d089abcb5f43da122e4b97575e671213457.tar.gz packages-77a32d089abcb5f43da122e4b97575e671213457.tar.bz2 packages-77a32d089abcb5f43da122e4b97575e671213457.tar.xz packages-77a32d089abcb5f43da122e4b97575e671213457.zip |
user/dracut: add easy-boot hook
Diffstat (limited to 'user/dracut/dracut.easy-boot')
-rw-r--r-- | user/dracut/dracut.easy-boot | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/user/dracut/dracut.easy-boot b/user/dracut/dracut.easy-boot new file mode 100644 index 000000000..53c95c54e --- /dev/null +++ b/user/dracut/dracut.easy-boot @@ -0,0 +1,14 @@ +#!/bin/sh -e + +for i in /boot/vmlinu[xz]*; do + version="${i##*/vmlinu[xz]}" + # Support filenames with no version. LILO supports this, but GRUB + # doesn't (currently). + version="${version#-}" + if ! [ -d /lib/modules/"$version" ]; then + printf '>>> %s: no modules installed, skipping\n' "$version" >&2 + continue + fi + printf '>>> %s\n' "$version" >&2 + dracut --force --quiet /boot/initramfs-"$version".img "$version" +done |