#!/bin/sh arch=$(uname -m) case $arch in arc|blackfin|m68k|metag|nios2|s390x|sh4eb) poweroff ;; *) /usr/bin/qmp |nc 10.0.2.2 4444 ;; esac