home *** CD-ROM | disk | FTP | other *** search
/ PCNET 2006 September - Disc 1 / PCNET_CD_2006_09.iso / linux / puppy-barebones-2.01r2.iso / pup_201.sfs / usr / X11R6 / bin / wmpoweroff < prev    next >
Encoding:
Text File  |  2006-03-05  |  449 b   |  16 lines

  1. #!/bin/sh
  2. #introduced v0.9.8
  3. #called from /root/.fvwm95rc, .jwmrc at shutdown.
  4.  
  5. echo -n "poweroff" > /tmp/wmexitmode.txt
  6. sync
  7. #PSLIST="`ps`"
  8. #kill `echo "$PSLIST" |grep "X "|grep -v "grep"|sed "s/^\ *//"|sed "s/ .*$//"|head -n 1`
  9. #exec killall X
  10. killall X #default is SIGTERM.
  11. sleep 1           #v1.0.7
  12. exec killall -9 X #v1.0.7 make sure X is killed.
  13.  
  14. #after exit from X, there is a return to /usr/X11R6/bin/xwin,
  15. #which reads /tmp/wmexitmode.txt.
  16.