forked from pool/systemd
14 lines
406 B
Plaintext
14 lines
406 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
eval $(/sbin/udevadm info --export --export-prefix=ROOT_ --device-id-of-file=/)
|
||
|
|
||
|
[ "$ROOT_MAJOR" -gt 0 ] || return
|
||
|
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
|