Hi all,

I don't know who the maintainer is for redhat's configuration of apmd,
but there is a little bug in the apmd's apmscript regarding the LOCK_X
flag. 

The first change (adding the sleep 3) keeps apm from locking up my HP
4150 Laptop (assuming I've also set changevt; why isn't this on by 
default, does it actually hurt anybody?)  

The second change is to handle commenting out LOCK_X in sysconfig/apmd
which is what the maintainer did.

Cheers,
-kls

----cut----
--- apmscript   2001/04/19 04:26:04     1.1
+++ apmscript   2001/04/19 04:28:29
@@ -54,8 +54,8 @@
 
        # Don't try to restore the terminal or lock X if X isn't running...
        [ "x`pidof X`" != x ] && {
-               [ "$CHANGEVT" != "0" ] && chvt 1
-               [ "x$LOCK_X" != "x0" ] && {
+               [ "$CHANGEVT" != "0" ] && { chvt 1; sleep 3 }
+               [ "x$LOCK_X" != "x" && "x$LOCK_X" != "x0" ] && {
                        # Lock X, based on patch from Hannu Martikka
                        # <[EMAIL PROTECTED]>
                        w |tail +3 |awk '{print $1, $3}'|grep -v '-'|grep : | \
@@ -147,7 +147,7 @@
        fi
 
        # restore X if necessary
-       [ "$CHANGEVT" != "0" ] && [ "x`pidof X`" != x ] && chvt "$CHANGEVT"
+       [ "$CHANGEVT" != "0" ] && [ "x`pidof X`" != x ] && { sleep 3; chvt "$CHANGEVT" 
+}
 
        if [ "$PCMCIARESTART" = "yes" ] ; then
                /usr/sbin/cardctl resume
----cut----


-- 
          //                               .--=,
 .....::://::::::::::::::::::::::::::::.. (o O &           [EMAIL PROTECTED]
:::::::://:::://://://:/:://::||_//       / V  K   
 :::::://:::://:/:|//'/' // _,|'         r ,  'qk   
  :'''/____ // /  //  |_// // ||        .'~.  .~`, 
                                   kls   \_/-=\_/



_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

Reply via email to