diff options
| author | Richard Purdie <richard@openedhand.com> | 2006-07-21 10:10:31 +0000 |
|---|---|---|
| committer | Richard Purdie <richard@openedhand.com> | 2006-07-21 10:10:31 +0000 |
| commit | b2f192faabe412adce79534e22efe9fb69ee40e2 (patch) | |
| tree | 7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/initscripts/initscripts-1.0/halt | |
| parent | 2cf0eadf9f730027833af802d7e6c90b44248f80 (diff) | |
| download | poky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz | |
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/initscripts/initscripts-1.0/halt')
| -rwxr-xr-x | meta/packages/initscripts/initscripts-1.0/halt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/meta/packages/initscripts/initscripts-1.0/halt b/meta/packages/initscripts/initscripts-1.0/halt new file mode 100755 index 0000000000..aa1769606a --- /dev/null +++ b/meta/packages/initscripts/initscripts-1.0/halt | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | #! /bin/sh | ||
| 2 | # | ||
| 3 | # halt Execute the halt command. | ||
| 4 | # | ||
| 5 | # Version: @(#)halt 2.84-2 07-Jan-2002 miquels@cistron.nl | ||
| 6 | # | ||
| 7 | |||
| 8 | PATH=/sbin:/bin:/usr/sbin:/usr/bin | ||
| 9 | |||
| 10 | # Update the timestamp, if there is already one | ||
| 11 | if test -e /etc/timestamp | ||
| 12 | then | ||
| 13 | date +%2m%2d%2H%2M%Y > /etc/timestamp | ||
| 14 | fi | ||
| 15 | |||
| 16 | # See if we need to cut the power. | ||
| 17 | if test -x /etc/init.d/ups-monitor | ||
| 18 | then | ||
| 19 | /etc/init.d/ups-monitor poweroff | ||
| 20 | fi | ||
| 21 | |||
| 22 | # Don't shut down drives if we're using RAID. | ||
| 23 | hddown="-h" | ||
| 24 | if grep -qs '^md.*active' /proc/mdstat | ||
| 25 | then | ||
| 26 | hddown="" | ||
| 27 | fi | ||
| 28 | |||
| 29 | halt -d -f -i -p $hddown | ||
| 30 | |||
| 31 | : exit 0 | ||
