home *** CD-ROM | disk | FTP | other *** search
/ chilidog.highland.cc.ks.us / chilidog.highland.cc.ks.us.zip / chilidog.highland.cc.ks.us / backup / bradford.20110502.etc.tar.gz / bradford.20110502.etc.tar / etc / cron.daily / suse.de-check-battery < prev    next >
Text File  |  2004-07-23  |  566b  |  32 lines

  1. #!/bin/sh
  2. #
  3. #
  4. # Copyright (c) 2002 SuSE Linux AG, Nuernberg, Germany.   
  5. #
  6. # please send bugfixes or comments to http://www.suse.de/feedback.
  7. #
  8.  
  9.  
  10. #
  11. # paranoia settings
  12. #
  13. umask 022
  14.  
  15. PATH=/sbin:/bin:/usr/sbin:/usr/bin
  16. export PATH
  17.  
  18. #
  19. # check CMOS Battery
  20. #
  21. test -r /proc/driver/rtc && \
  22.     BATT_STATUS=$(awk '$1 == "batt_status" { print $3 }' /proc/driver/rtc)
  23.  
  24. test -r /proc/rtc && \
  25.     BATT_STATUS=$(awk '$1 == "batt_status" { print $3 }' /proc/rtc)
  26.  
  27.  
  28. test -n "$BATT_STATUS" -a "$BATT_STATUS" != "okay" && \
  29.     echo "CMOS battery empty -- expect problems"
  30.  
  31. exit 0
  32.