updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / uswsusp-fbsplash / uresume-hook
blob041059b9aa54763dff26bfcd3857f7d373e0ab06
1 #!/bin/sh
3 run_hook ()
5 # Ignore the /etc/suspend.conf parameter and use the kernel cmdline
6 case ,$splash, in *,silent,* )
7 # Wait for any Fbcondecor fade in - may take very long on broken systems
9 i=0
10 while [ -n "$( pidof fbcondecor_helper )" ]; do
11 if [ $i -ge 50 ]; then
12 err "timeout on waiting for fbcondecor_helper to die!"
13 exit 1
15 sleep .1
16 i=$(( i + 1 ))
17 done
18 # Resume with Fbsplash or try without
19 ) && \
20 /usr/lib/suspend/resume -P "splash = y"
21 ;; * )
22 # Resume without Fbsplash
23 false
24 esac || \
25 /usr/lib/suspend/resume -P "splash = n"
28 # vim:set ft=sh: