1#!/bin/bash -e
2
3source "${POST_HELPER:-$(dirname "$(realpath "$0")")/../post-hooks/post-helper}"
4
5REBOOT_WRAPPER=busybox-reboot
6
7[ "$(readlink sbin/reboot)" = busybox ] || exit 0
8
9echo "Fixing up busybox reboot commands..."
10
11install -D -m 0755 "$RK_DATA_DIR/$REBOOT_WRAPPER" sbin/$REBOOT_WRAPPER
12
13for cmd in halt reboot poweroff shutdown; do
14	ln -sf $REBOOT_WRAPPER sbin/$cmd
15done
16