master reboot
 1#!/bin/sh
 2# handle end signals, bc userland doesnt understand us...
 3
 4[ "$1" = '-f' ] && {
 5    # still need to fall back to actual reboot after situation calls -f
 6    busybox ${0##*/} -f || { echo 'unknown signal'; exit 1; }
 7    exit
 8}
 9
10case ${0##*/} in
11    poweroff) kill -TERM 1;;
12    reboot) kill -INT 1;;
13    halt) kill -USR1 1;;
14    *) echo 'unknown signal'; exit 1 ;;
15esac