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