2025-05-10 21:49:39 +08:00

16 lines
381 B
Bash
Executable File

#!/bin/bash -e
source "${POST_HELPER:-$(dirname "$(realpath "$0")")/../post-hooks/post-helper}"
REBOOT_WRAPPER=busybox-reboot
[ "$(readlink sbin/reboot)" = busybox ] || exit 0
echo "Fixing up busybox reboot commands..."
install -D -m 0755 "$RK_DATA_DIR/$REBOOT_WRAPPER" sbin/$REBOOT_WRAPPER
for cmd in halt reboot poweroff shutdown; do
ln -sf $REBOOT_WRAPPER sbin/$cmd
done