#!/bin/sh if [ `id -u` != 0 ] ; then #if not already root, call itself as root exec sudo gainroot <<EOF exec $0 $* EOF exit $? fi #real script follows reboot
dbus-send --system --type=method_call --dest="com.nokia.mce" --print-reply "/com/nokia/mce/request" com.nokia.mce.request.req_reboot