[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#568645: setupcon requires udevadm trigger && udevadm settle



Hello,

following those directives, could be:

udevadm trigger --action=change --subsystem-match=input

I have written the attached patch to solve that,

Jordi Pujol

Live never ending Tale
GNU/Linux Live forever!
http://livenet.selfip.com


A Dissabte, 6 de febrer de 2010 18:32:41, vàreu escriure:
> On Feb 06, Jordi Pujol <jordipujolp@gmail.com> wrote:
> > udevadm trigger && udevadm settle
> 
> No package should call "udevadm trigger", ever.
> At most, if this is actually needed by the package, the command used
> should be something like "udevadm trigger --action=change
> --xxxxx-match=yyyy" with the appropriate options to restrict the events
> to only the right devices.
> 
> I see no reason to call "udevadm settle" either in this scenario.
> 
--- /bin/setupcon.old	2010-01-14 22:15:57.000000000 +0100
+++ /bin/setupcon	2010-02-06 21:20:05.000000000 +0100
@@ -390,6 +390,7 @@
 	if [ "$save_only" != yes ]; then
 	    if [ "$KMAP" -a -f "$KMAP" ]; then
 		eval loadkeys "$KMAP" $verbose
+		udevadm trigger --action=change --subsystem-match=input
 	    else		    
 		if \
 		    [ "$VARIANT" = '' ] && [ "$CONFIG" != "$USER_CONFIG" ] \
@@ -398,14 +399,17 @@
 		           -ot /etc/default/keyboard ]
 		then
 		    eval loadkeys /etc/console-setup/cached.kmap.gz $verbose
+		    udevadm trigger --action=change --subsystem-match=input
 		else
 		    if [ -d /usr/share/X11/xkb ]; then
 			ckbcomp $acm_option $rules_option \
 			    -model "$XKBMODEL" \
 			    "$XKBLAYOUT" "$XKBVARIANT" "$XKBOPTIONS" \
 			    | eval loadkeys $verbose
+			udevadm trigger --action=change --subsystem-match=input
 		    elif [ -f /etc/console-setup/cached.kmap.gz ]; then
 			eval loadkeys /etc/console-setup/cached.kmap.gz $verbose
+			udevadm trigger --action=change --subsystem-match=input
 		    fi
 		fi
 	    fi

Reply to: