![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| BSD BSD, sometimes called Berkeley Unix, is a Unix operating system developed by the Computer Systems Research Group of the UC Berkeley. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| About Battery Update 1.2 | iBot | OS X Support RSS | 0 | 05-19-2009 02:30 PM |
| Getting same exit status for empty and non empty file | mavesum | UNIX for Dummies Questions & Answers | 4 | 12-03-2008 09:59 AM |
| ibm san cache battery with aix | itik | AIX | 2 | 05-15-2008 07:40 PM |
| Battery 1.01 (Default branch) | iBot | Software Releases - RSS News | 0 | 05-12-2008 07:00 AM |
| how to find empty folders without using -empty | lasse | UNIX for Dummies Questions & Answers | 7 | 01-17-2008 02:30 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
|
|
||||
|
Code:
#!/bin/csh
# /usr/local/sbin/batterytest
# Baterry control
set restminutes=`/sbin/sysctl -n hw.acpi.battery.time`
set modus=`/sbin/sysctl -n hw.acpi.battery.state`
# does it have Power Supply connected?
if ( "${modus}" == "1" ) then
# 7 Minutes?
if ( "${restminutes}" < "7" ) then
shutdown -p +2 "The Battery is empty! The Computer will shutdown after 2 Minutes!" &
endif
endif
Code:
# chown root /usr/local/sbin/batterytest # chmod u+x /usr/local/sbin/batterytest Code:
*/5 * * * * /usr/local/sbin/batterytest |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|