diff options
author | Gabriel <g2p.code@gmail.com> | 2013-04-11 16:44:03 +0200 |
---|---|---|
committer | Kent Overstreet <koverstreet@google.com> | 2013-04-11 17:08:23 -0700 |
commit | 944cb4ce32b7c8a090d6ecd36eef1946d85a8048 (patch) | |
tree | 6a446827c1aebe9c354717436b737d811f825274 /initramfs | |
parent | 3088f201edfe5cb0ad6117d84146c0b2b84205e8 (diff) |
Register devices with just udev.
This means bcache devices will be registered earlier and in all
cases, not just when the rootfs fails to mount.
The initramfs hook is still there to ensure the bcache module
and udev rules are shipped if an initramfs is used.
Diffstat (limited to 'initramfs')
-rwxr-xr-x | initramfs/hook | 4 | ||||
-rwxr-xr-x | initramfs/script | 32 |
2 files changed, 3 insertions, 33 deletions
diff --git a/initramfs/hook b/initramfs/hook index 3c429d0d..ce328f3a 100755 --- a/initramfs/hook +++ b/initramfs/hook @@ -16,5 +16,7 @@ esac . /usr/share/initramfs-tools/hook-functions -copy_exec /bin/mknod +cp -pt "${DESTDIR}/lib/udev/rules.d" /lib/udev/rules.d/61-bcache.rules +copy_exec /lib/udev/bcache-register +copy_exec /sbin/probe-bcache manual_add_modules bcache diff --git a/initramfs/script b/initramfs/script deleted file mode 100755 index 926d5d3e..00000000 --- a/initramfs/script +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -mountroot_fail() -{ - for i in `ls /dev/sd*`; do - echo $i > /sys/fs/bcache/register_quiet - done - -# for i in `ls /sys/dev/block/`; do -# DEV=/bcache_dev -# -# mknod $DEV b `echo $i|sed -e 's/:/ /'` -# echo $DEV > /sys/fs/bcache/register_quiet -# rm $DEV -# done -} - -case $1 in -prereqs) - exit 0 - ;; -mountfail) - mountroot_fail - exit 0 - ;; -esac - -. /scripts/functions - -add_mountroot_fail_hook "30-bcache" - -exit 0 |