summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2007-11-13 22:40:48 +0000
committerMatthias Schwarzott <zzam@gentoo.org>2007-11-13 22:40:48 +0000
commit33f2fa337669a7823c111e7757aa187873e9d72d (patch)
treedaa0841888dc6181ebbfb87856c1e24c79b56841 /sys-fs/udev/files
parentVersion bump to test a fix for bug #198083. (diff)
downloadgentoo-2-33f2fa337669a7823c111e7757aa187873e9d72d.tar.gz
gentoo-2-33f2fa337669a7823c111e7757aa187873e9d72d.tar.bz2
gentoo-2-33f2fa337669a7823c111e7757aa187873e9d72d.zip
Version bumped. Now all helper-apps are merged into binary udevadm. This needs to be included when building initramfs'. Using udevadm for providing /dev/root link. Added special warning for Bug #190994. No longer install udevstart, it is not needed for 2.6.15 and newer and just confuses people.
(Portage version: 2.1.3.19)
Diffstat (limited to 'sys-fs/udev/files')
-rw-r--r--sys-fs/udev/files/digest-udev-1173
-rwxr-xr-xsys-fs/udev/files/write_root_link_rule29
2 files changed, 32 insertions, 0 deletions
diff --git a/sys-fs/udev/files/digest-udev-117 b/sys-fs/udev/files/digest-udev-117
new file mode 100644
index 000000000000..b6e85578a5dd
--- /dev/null
+++ b/sys-fs/udev/files/digest-udev-117
@@ -0,0 +1,3 @@
+MD5 d3c1a5cdc772fffe70253e07a5f80e17 udev-117.tar.bz2 199961
+RMD160 bce663cb6c2bdd449b67122e01c8da106feb7a1f udev-117.tar.bz2 199961
+SHA256 42ffd09f50f6a0e16d832dbe0e8f1b2aa558b8982d1dd767ddb23365f9736dee udev-117.tar.bz2 199961
diff --git a/sys-fs/udev/files/write_root_link_rule b/sys-fs/udev/files/write_root_link_rule
new file mode 100755
index 000000000000..4d6cd78c9d37
--- /dev/null
+++ b/sys-fs/udev/files/write_root_link_rule
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# This script should run before doing udevtrigger at boot.
+# It will create a rule matching the device directory / is on, and
+# creating /dev/root symlink pointing on its device node.
+#
+# This is especially useful for hal looking at /proc/mounts containing
+# a line listing /dev/root as device:
+# /dev/root / reiserfs rw 0 0
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation version 2 of the License.
+#
+# (c) 2007 Matthias Schwarzott <zzam@gentoo.org>
+
+DEV=$(udevadm info --device-id-of-file=/)
+if [ $? = 0 ]; then
+ MAJOR="${DEV% *}"
+ MINOR="${DEV#* }"
+
+ [ -d /dev/.udev/rules.d ] || mkdir -p /dev/.udev/rules.d
+ RULES=/dev/.udev/rules.d/10-root-link.rules
+
+ echo "# Created by /lib/udev/write_root_link_rule" > "${RULES}"
+ echo "# This rule should create /dev/root as link to real root device." >> "${RULES}"
+ echo "SUBSYSTEM==\"block\", ENV{MAJOR}==\"$MAJOR\", ENV{MINOR}==\"$MINOR\", SYMLINK+=\"root\"" >> "${RULES}"
+fi
+