diff options
-rw-r--r-- | initramfs-tools/scripts/samizdat | 5 | ||||
-rw-r--r-- | src/initrd/common.sh | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/initramfs-tools/scripts/samizdat b/initramfs-tools/scripts/samizdat index 850a855..4658278 100644 --- a/initramfs-tools/scripts/samizdat +++ b/initramfs-tools/scripts/samizdat | |||
@@ -20,7 +20,6 @@ mountroot() | |||
20 | openvt -c 13 sh | 20 | openvt -c 13 sh |
21 | 21 | ||
22 | mkfifo "$MENUFIFO" | 22 | mkfifo "$MENUFIFO" |
23 | samizdat_install_udev_rules | ||
24 | 23 | ||
25 | if [ "$nbdroot" ]; then | 24 | if [ "$nbdroot" ]; then |
26 | my_configure_networking | 25 | my_configure_networking |
@@ -67,9 +66,11 @@ wait_for_gnupghome_tar() | |||
67 | 66 | ||
68 | samizdat_install_udev_rules() | 67 | samizdat_install_udev_rules() |
69 | { | 68 | { |
69 | local target=/etc/udev/rules.d/z00_blockdev_mountroot.rules | ||
70 | [ -e "$target" ] && return | ||
70 | mkdir -p /etc/udev/rules.d | 71 | mkdir -p /etc/udev/rules.d |
71 | echo 'ACTION=="add", SUBSYSTEM=="block", RUN+="/bin/grok-block $env{DEVNAME}"' \ | 72 | echo 'ACTION=="add", SUBSYSTEM=="block", RUN+="/bin/grok-block $env{DEVNAME}"' \ |
72 | > /etc/udev/rules.d/z00_blockdev_mountroot.rules | 73 | > "$target" |
73 | 74 | ||
74 | # 'udevadm trigger --action=add' does not work here; need to restard udevd | 75 | # 'udevadm trigger --action=add' does not work here; need to restard udevd |
75 | # first. not sure why | 76 | # first. not sure why |
diff --git a/src/initrd/common.sh b/src/initrd/common.sh index 5c8ece3..c38fb77 100644 --- a/src/initrd/common.sh +++ b/src/initrd/common.sh | |||
@@ -47,6 +47,7 @@ bootmenu() | |||
47 | if [ $? != 0 -a ! "$no_panic" ]; then | 47 | if [ $? != 0 -a ! "$no_panic" ]; then |
48 | panic "error loading boot menu! the system won't be usable :(" | 48 | panic "error loading boot menu! the system won't be usable :(" |
49 | fi | 49 | fi |
50 | samizdat_install_udev_rules | ||
50 | if [ "$do_trigger" ]; then | 51 | if [ "$do_trigger" ]; then |
51 | force_grok_block | 52 | force_grok_block |
52 | fi | 53 | fi |