diff options
Diffstat (limited to 'initramfs-tools/scripts/samizdat')
-rw-r--r-- | initramfs-tools/scripts/samizdat | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/initramfs-tools/scripts/samizdat b/initramfs-tools/scripts/samizdat index 81a38d5..3f2ee43 100644 --- a/initramfs-tools/scripts/samizdat +++ b/initramfs-tools/scripts/samizdat | |||
@@ -10,6 +10,34 @@ mountroot() | |||
10 | mount -o move /btrfs /root | 10 | mount -o move /btrfs /root |
11 | mkdir /root/cdrom | 11 | mkdir /root/cdrom |
12 | mount -o move /cdrom /root/cdrom | 12 | mount -o move /cdrom /root/cdrom |
13 | |||
13 | sed -i -e 's/^root:x:/root::/' /root/etc/passwd | 14 | sed -i -e 's/^root:x:/root::/' /root/etc/passwd |
15 | |||
16 | samizdat_install_udev_rules | ||
17 | |||
18 | openvt -c 13 sh | ||
19 | sleep 100 | ||
14 | set +x | 20 | set +x |
15 | } | 21 | } |
22 | |||
23 | samizdat_install_udev_rules() | ||
24 | { | ||
25 | mkdir -p /etc/udev/rules.d | ||
26 | echo 'ACTION=="add", SUBSYSTEM=="block", RUN+="/bin/grok-block $env{DEVNAME}"' \ | ||
27 | > /etc/udev/rules.d/z00_blockdev_mountroot.rules | ||
28 | |||
29 | # 'udevadm trigger --action=add' does not work here; need to restard udevd | ||
30 | # first. not sure why | ||
31 | samizdat_restart_udev | ||
32 | |||
33 | udevadm trigger -s block --action add | ||
34 | } | ||
35 | |||
36 | samizdat_restart_udev() | ||
37 | { | ||
38 | mkdir -p /var/log | ||
39 | ps aux|grep systemd-udevd | ||
40 | killall systemd-udevd | ||
41 | /lib/systemd/systemd-udevd --resolve-names=never --debug >/var/log/udevd-systemd.log 2>&1 & | ||
42 | udevadm hwdb --update # rule is not executed by 'udevadm trigger' otherwise. not sure why | ||
43 | } \ No newline at end of file | ||