diff options
Diffstat (limited to 'sys-apps/sysvinit/files/shutdown.sh')
-rwxr-xr-x | sys-apps/sysvinit/files/shutdown.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sys-apps/sysvinit/files/shutdown.sh b/sys-apps/sysvinit/files/shutdown.sh new file mode 100755 index 000000000000..502ef5273cd6 --- /dev/null +++ b/sys-apps/sysvinit/files/shutdown.sh @@ -0,0 +1,13 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +opts="-d" +[ "${INIT_HALT}" != "HALT" ] && opts="${opts}p" +[ "${RC_DOWN_INTERFACE}" = "yes" ] && opts="${opts}i" +[ "${RC_DOWN_HARDDISK}" = "yes" ] && opts="${opts}h" + +/sbin/halt "${opts}" + +# hmm, if the above failed, that's kind of odd ... +# so let's force a halt +/sbin/halt -f |