2012-10-26 14:34:44 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-11-22 15:32:12 +01:00
|
|
|
eval $(@@PREFIX@@/udevadm info --export --export-prefix=ROOT_ --device-id-of-file=/)
|
2012-10-26 14:34:44 +02:00
|
|
|
|
2014-02-10 12:20:21 +01:00
|
|
|
[ "$ROOT_MAJOR" -gt 0 ] || exit 0
|
2012-10-26 14:34:44 +02:00
|
|
|
mkdir -m 0755 -p /run/udev/rules.d >/dev/null 2>&1
|
|
|
|
ln -sf /run/udev /dev/.udev 2>/dev/null || :
|
|
|
|
|
|
|
|
echo "ACTION==\"add|change\", SUBSYSTEM==\"block\", \
|
|
|
|
ENV{MAJOR}==\"$ROOT_MAJOR\", ENV{MINOR}==\"$ROOT_MINOR\", \
|
|
|
|
SYMLINK+=\"root\"" > /run/udev/rules.d/10-root-symlink.rules
|
|
|
|
|
|
|
|
exit 0
|