diff options
author | Stanislav Brabec <sbrabec@suse.cz> | 2010-07-24 15:37:21 +0200 |
---|---|---|
committer | Stanislav Brabec <sbrabec@suse.cz> | 2010-07-24 15:37:21 +0200 |
commit | bf242510ce91aef3472a1ac4521410a867ea0964 (patch) | |
tree | eee010f06431e2b9567b19d1bfadeb5f034b62cc /recipes/udev/files/udev-compat-wrapper-patch | |
parent | e5dd04945be46561a37f9c4401f4169cb63a7598 (diff) |
udev: Added support for udev-compat.
* http://lists.linuxtogo.org/pipermail/openembedded-devel/2010-July/021662.html
Signed-off-by: Stanislav Brabec <utx@penguin.cz>
Acked-by: Andrea Adami <andrea.adami@gmail.com>
Diffstat (limited to 'recipes/udev/files/udev-compat-wrapper-patch')
-rw-r--r-- | recipes/udev/files/udev-compat-wrapper-patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/recipes/udev/files/udev-compat-wrapper-patch b/recipes/udev/files/udev-compat-wrapper-patch new file mode 100644 index 0000000000..a3e312d6a6 --- /dev/null +++ b/recipes/udev/files/udev-compat-wrapper-patch @@ -0,0 +1,37 @@ +This patch should be applied on platforms which support kernels < 2.6.27 and need udev-compat package. + +It should be applied after: +sed -i "s:/sbin/udevd:\$UDEVD:g;s:/sbin/udevadm:\$UDEVADM:g" init + +It has not .patch suffix, because such files would not be copied to +WORKDIR and cannot be selectively applied on another source file. + +--- init ++++ init +@@ -11,6 +11,17 @@ + + export TZ=/etc/localtime + ++UDEVD="/sbin/udevd" ++UDEVADM="/sbin/udevadm" ++# If we are running an old kernel and have a static udev present use that instead ++if [ -e /sbin/udevd-compat ] ; then ++ KERNELMICROVER="$(uname -r | awk -F. '{print $3}')" ++ if [ $KERNELMICROVER -lt 27 ] ; then ++ UDEVD="/sbin/udevd-compat" ++ UDEVADM="/sbin/udevadm-compat" ++ fi ++fi ++ + [ -d /sys/class ] || exit 1 + [ -r /proc/mounts ] || exit 1 + [ -x $UDEVD ] || exit 1 +@@ -21,6 +32,8 @@ + if [ -x /sbin/pidof ]; then + pid=`/sbin/pidof -x udevd` + [ -n "$pid" ] && kill $pid ++ pid=`/sbin/pidof -x udevd-compat` ++ [ -n "$pid" ] && kill $pid + fi + } + |