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