diff options
author | 2011-05-03 22:43:14 +0200 | |
---|---|---|
committer | 2011-08-01 11:56:06 -0500 | |
commit | bfcc0359e5d2b938705ccb21901fdc818c703efe (patch) | |
tree | 688d25d94299e86bc608577cdfa01749a9551a29 /helpers | |
parent | make our population calls match upstreams recommendations (diff) | |
download | udev-gentoo-scripts-bfcc0359e5d2b938705ccb21901fdc818c703efe.tar.gz udev-gentoo-scripts-bfcc0359e5d2b938705ccb21901fdc818c703efe.tar.bz2 udev-gentoo-scripts-bfcc0359e5d2b938705ccb21901fdc818c703efe.zip |
Query udevadm for udev's runtime directory
Previously we were using /dev/.udev as a hard coded value, but this does
not allow us to transition easily to /run/udev. Querying the value from
udevadm allows us to do this in a way that is transparent to the user.
This code was written originally by Matthias Schwarzot and modified by
William Hubbs. The commit message was also modified by William Hubbs.
Diffstat (limited to 'helpers')
-rwxr-xr-x | helpers/write_root_link_rule | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helpers/write_root_link_rule b/helpers/write_root_link_rule index 8eaea11..56c7998 100755 --- a/helpers/write_root_link_rule +++ b/helpers/write_root_link_rule @@ -19,7 +19,7 @@ eval $(udevadm info --export --export-prefix="ROOT_" --device-id-of-file=/) [ $? = 0 ] || exit 0 [ "$ROOT_MAJOR" = 0 ] && exit 0 -DIR=/dev/.udev/rules.d +[ -e /run ] && DIR=/run/udev/rules.d || DIR=/dev/.udev/rules.d [ -d "$DIR" ] || mkdir -p "$DIR" RULES=$DIR/10-root-link.rules |