* [PATCH] init: fix for setting udev logging priority
@ 2011-08-02 12:46 Michal Soltys
[not found] ` <1312289216-5958-1-git-send-email-soltys-R61QfzASbfY@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Michal Soltys @ 2011-08-02 12:46 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
Previously udevproperty() function was called, which would lead to
setting not intended properties instead of actually adjusting logging
priority, e.g.:
udevadm control --property=--log-priority=info
Now, udevadm is called directly from the init script.
Signed-off-by: Michal Soltys <soltys-R61QfzASbfY@public.gmane.org>
---
modules.d/99base/init | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/modules.d/99base/init b/modules.d/99base/init
index ae834be..34a8aef 100755
--- a/modules.d/99base/init
+++ b/modules.d/99base/init
@@ -189,16 +189,14 @@ source_hook pre-udev
# start up udev and trigger cold plugs
udevd --daemon --resolve-names=never
-UDEV_LOG_PRIO_ARG=--log-priority
-UDEV_QUEUE_EMPTY="udevadm settle --timeout=0"
-
if [ $UDEVVERSION -lt 140 ]; then
- UDEV_LOG_PRIO_ARG=--log_priority
UDEV_QUEUE_EMPTY="udevadm settle --timeout=1"
+else
+ UDEV_QUEUE_EMPTY="udevadm settle --timeout=0"
fi
-getargbool 0 rd.udev.info -y rdudevinfo && udevproperty "$UDEV_LOG_PRIO_ARG=info"
-getargbool 0 rd.udev.debug -y rdudevdebug && udevproperty "$UDEV_LOG_PRIO_ARG=debug"
+getargbool 0 rd.udev.info -y rdudevinfo && udevadm control --log-priority=info
+getargbool 0 rd.udev.debug -y rdudevdebug && udevadm control --log-priority=debug
udevproperty "hookdir=$hookdir"
getarg 'rd.break=pre-trigger' 'rdbreak=pre-trigger' && emergency_shell -n pre-trigger "Break before pre-trigger"
--
1.7.5.2
^ permalink raw reply related [flat|nested] 2+ messages in thread[parent not found: <1312289216-5958-1-git-send-email-soltys-R61QfzASbfY@public.gmane.org>]
* Re: [PATCH] init: fix for setting udev logging priority [not found] ` <1312289216-5958-1-git-send-email-soltys-R61QfzASbfY@public.gmane.org> @ 2011-08-02 13:00 ` Harald Hoyer 0 siblings, 0 replies; 2+ messages in thread From: Harald Hoyer @ 2011-08-02 13:00 UTC (permalink / raw) To: Michal Soltys; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 1607 bytes --] On 02.08.2011 14:46, Michal Soltys wrote: > Previously udevproperty() function was called, which would lead to > setting not intended properties instead of actually adjusting logging > priority, e.g.: > > udevadm control --property=--log-priority=info > > Now, udevadm is called directly from the init script. > > Signed-off-by: Michal Soltys <soltys-R61QfzASbfY@public.gmane.org> > --- > modules.d/99base/init | 10 ++++------ > 1 files changed, 4 insertions(+), 6 deletions(-) > > diff --git a/modules.d/99base/init b/modules.d/99base/init > index ae834be..34a8aef 100755 > --- a/modules.d/99base/init > +++ b/modules.d/99base/init > @@ -189,16 +189,14 @@ source_hook pre-udev > # start up udev and trigger cold plugs > udevd --daemon --resolve-names=never > > -UDEV_LOG_PRIO_ARG=--log-priority > -UDEV_QUEUE_EMPTY="udevadm settle --timeout=0" > - > if [ $UDEVVERSION -lt 140 ]; then > - UDEV_LOG_PRIO_ARG=--log_priority > UDEV_QUEUE_EMPTY="udevadm settle --timeout=1" > +else > + UDEV_QUEUE_EMPTY="udevadm settle --timeout=0" > fi > > -getargbool 0 rd.udev.info -y rdudevinfo && udevproperty "$UDEV_LOG_PRIO_ARG=info" > -getargbool 0 rd.udev.debug -y rdudevdebug && udevproperty "$UDEV_LOG_PRIO_ARG=debug" > +getargbool 0 rd.udev.info -y rdudevinfo && udevadm control --log-priority=info > +getargbool 0 rd.udev.debug -y rdudevdebug && udevadm control --log-priority=debug > udevproperty "hookdir=$hookdir" > > getarg 'rd.break=pre-trigger' 'rdbreak=pre-trigger' && emergency_shell -n pre-trigger "Break before pre-trigger" I think the attached patch solves the problem: [-- Attachment #2: dracut-udevadm-control.patch --] [-- Type: text/plain, Size: 1120 bytes --] commit e36ee58d0e269e6a403f184177d4f14f05b1d3d0 Author: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Date: Tue Aug 2 14:57:49 2011 +0200 99base/init: use udevadm control to set the logging priority due to a bad revert commit, "udevadm control" was converted to "udevproperty", which is the wrong command to set the logging priority. diff --git a/modules.d/99base/init b/modules.d/99base/init index ae834be..b991196 100755 --- a/modules.d/99base/init +++ b/modules.d/99base/init @@ -197,8 +197,8 @@ if [ $UDEVVERSION -lt 140 ]; then UDEV_QUEUE_EMPTY="udevadm settle --timeout=1" fi -getargbool 0 rd.udev.info -y rdudevinfo && udevproperty "$UDEV_LOG_PRIO_ARG=info" -getargbool 0 rd.udev.debug -y rdudevdebug && udevproperty "$UDEV_LOG_PRIO_ARG=debug" +getargbool 0 rd.udev.info -y rdudevinfo && udevadm control "$UDEV_LOG_PRIO_ARG=info" +getargbool 0 rd.udev.debug -y rdudevdebug && udevadm control "$UDEV_LOG_PRIO_ARG=debug" udevproperty "hookdir=$hookdir" getarg 'rd.break=pre-trigger' 'rdbreak=pre-trigger' && emergency_shell -n pre-trigger "Break before pre-trigger" ^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-02 13:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-02 12:46 [PATCH] init: fix for setting udev logging priority Michal Soltys
[not found] ` <1312289216-5958-1-git-send-email-soltys-R61QfzASbfY@public.gmane.org>
2011-08-02 13:00 ` Harald Hoyer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox