summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrikant Patnaik2015-02-23 08:51:06 +0530
committerSrikant Patnaik2015-02-23 08:51:06 +0530
commite809e32a652482f98c6bafce5bfe0b3524ba7be4 (patch)
tree20d97927bbedc4261b6d7529219cf598daf1f80e
parentdf6a97d632caf6da498cac2046f910fd246945f3 (diff)
downloadFOSSEE-netbook-tools-e809e32a652482f98c6bafce5bfe0b3524ba7be4.tar.gz
FOSSEE-netbook-tools-e809e32a652482f98c6bafce5bfe0b3524ba7be4.tar.bz2
FOSSEE-netbook-tools-e809e32a652482f98c6bafce5bfe0b3524ba7be4.zip
Probably fixed the service restart bug
service lightdm should now look for errors in Xorg log(though not efficient way, but it works)
-rwxr-xr-xprobe-hdmi/probe-hdmi.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/probe-hdmi/probe-hdmi.sh b/probe-hdmi/probe-hdmi.sh
index e3b092e..8cefb87 100755
--- a/probe-hdmi/probe-hdmi.sh
+++ b/probe-hdmi/probe-hdmi.sh
@@ -63,7 +63,12 @@ function try_lightdm_restart() {
while true;
do
sudo service lightdm restart
- [ $(service lightdm status|grep -o start) == 'start' ] && break
+ grep "(EE) FBDEV(0): mmap fbmem: Invalid argument" /var/log/Xorg.0.log
+ return_code_grep=$?
+ # [ $(service lightdm status|grep -o start) == 'start' ] && break
+ # If return code is 0 means the error exist in Xorg file, i.e, Xorg failed,
+ # so do restart, if its 1 means X might have restarted properly
+ [ $return_code_grep -eq 1 ] && break
done
#killall probe_hdmi.sh
}