Detect udevd version and behave accordingly.
We can no longer rely on the name of the udevd binary as a hint for its version, so instead we query the binary and behave accordingly. Change-Id: Id4c869dfeeca5ed970169343b6b5f0f2c4499ca3
This commit is contained in:
parent
1373ed5374
commit
09eb230ea3
@ -59,13 +59,18 @@ else
|
|||||||
UDEVD="udevd"
|
UDEVD="udevd"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$UDEVD" = "systemd-udevd" ]; then
|
# udev versions 176 and newer require a different on-disk setup
|
||||||
# devtmpfs is required since udev 176
|
UDEVD_VERSION=$($UDEVD --version)
|
||||||
|
|
||||||
|
if [ "$UDEVD_VERSION" != "" -a $UDEVD_VERSION -gt 175 ]; then
|
||||||
|
echo "Using new-style udevd setup"
|
||||||
mount -t devtmpfs none /dev
|
mount -t devtmpfs none /dev
|
||||||
mkdir -p /run
|
mkdir -p /run
|
||||||
mount -t tmpfs -o "nosuid,size=20%,mode=0755" tmpfs /run
|
mount -t tmpfs -o "nosuid,size=20%,mode=0755" tmpfs /run
|
||||||
mkdir -p /run/lock
|
mkdir -p /run/lock
|
||||||
|
mkdir -p /run/udev
|
||||||
else
|
else
|
||||||
|
echo "Using old-style udevd setup"
|
||||||
mount -t tmpfs none /dev
|
mount -t tmpfs none /dev
|
||||||
ln -sf /proc/self/fd /dev/fd
|
ln -sf /proc/self/fd /dev/fd
|
||||||
mknod /dev/null c 1 3
|
mknod /dev/null c 1 3
|
||||||
|
Loading…
Reference in New Issue
Block a user