]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
merge 95rootfs-block-udev and 95rootfs-block
authorHarald Hoyer <harald@redhat.com>
Fri, 15 May 2009 13:42:28 +0000 (15:42 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 15 May 2009 13:42:28 +0000 (15:42 +0200)
modules.d/95rootfs-block/genrules.sh [new file with mode: 0755]

diff --git a/modules.d/95rootfs-block/genrules.sh b/modules.d/95rootfs-block/genrules.sh
new file mode 100755 (executable)
index 0000000..0b42483
--- /dev/null
@@ -0,0 +1,14 @@
+
+resume=$(getarg resume=) && ! getarg noresume && [ -b "$resume" ] && {
+    (
+       /bin/echo -e 'KERNEL=="'${resume#/dev/}'", RUN+="/bin/echo %M:%m > /sys/power/resume"'
+       /bin/echo -e 'SYMLINK=="'${resume#/dev/}'", RUN+="/bin/echo %M:%m > /sys/power/resume"'
+    ) >> /etc/udev/rules.d/99-resume.rules
+}
+
+(
+ echo 'KERNEL=="'${root#/dev/}'", RUN+="/bin/mount '$fstype' -o '$rflags' '$root' '$NEWROOT'" '
+ echo 'SYMLINK=="'${root#/dev/}'", RUN+="/bin/mount '$fstype' -o '$rflags' '$root' '$NEWROOT'" '
+) >> /etc/udev/rules.d/99-mount.rules
+
+