#!/bin/sh
if [ $(cat /proc/1/comm) = "openrc-init" ] ; then
/sbin/openrc-shutdown -r
exit $?
#Try for common tools
if [ -x "/sbin/shutdown" ] ; then
elif [ -x "/sbin/shutdown" ] ; then
/sbin/shutdown -r now
elif [ -x "/usr/sbin/shutdown" ] ; then
/sbin/openrc-shutdown -p
/sbin/shutdown -h now