- #!/bin/sh
- #110505 support sudo for non-root user.
- #120408 support minit
- [ "`whoami`" != "root" ] && exec sudo -A ${0} ${@} #110505
- /etc/rc.d/rc.shutdown
- POWEROFFEXE='/bin/busybox poweroff'
- #[ -f /sbin/minit ] && POWEROFFEXE='/sbin/shutdown -o' #-o means poweroff. note: shutdown is part of minit pkg.
- [ -f /sbin/minit ] && POWEROFFEXE='hard-reboot POWER_OFF' #note: hard-reboot is part of minit pkg.
- exec ${POWEROFFEXE} #>/dev/null 2>&1
|