reboot 427 B

1234567891011121314
  1. #!/bin/sh
  2. #110505 support sudo for non-root user.
  3. #120408 support minit
  4. [ "`whoami`" != "root" ] && exec sudo -A ${0} ${@} #110505
  5. /etc/rc.d/rc.shutdown
  6. REBOOTEXE='/bin/busybox reboot'
  7. #[ -f /sbin/minit ] && REBOOTEXE='/sbin/shutdown -r' #-r means reboot. note, shutdown is part of minit pkg.
  8. [ -f /sbin/minit ] && REBOOTEXE='hard-reboot RESTART' #note, hard-reboot is part of minit pkg.
  9. exec ${REBOOTEXE} #>/dev/null 2>&1