linuxOS_AP06/device/rockchip/common/scripts/post-busybox-reboot.sh

16 lines
373 B
Bash
Raw Normal View History

2025-06-03 04:28:32 +00:00
#!/bin/bash -e
source "${RK_POST_HELPER:-$(dirname "$(realpath "$0")")/post-helper}"
REBOOT_WRAPPER=busybox-reboot
[ "$(readlink sbin/reboot)" = busybox ] || exit 0
message "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