#! /bin/sh #CMDLINE=`cat /proc/cmdline` #echo "akutelle kernel command line <$CMDLINE> " #kexec -l --append="$CMDLINE" /boot/uImage sync # sync all of the disks so as not to lose data sync sync echo 3 > /proc/sys/vm/drop_caches # RTC mit UTC setzen `/sbin/hwclock -wu` #umount -a # make sure all disks are unmounted #kexec -e # reboot the kernel lsof > /var/log/lsof.log dbus-send --system --type=signal /GUI com.rexroth.akku.gui.systemgoingdown int32:0 sleep 5 # Leistungsteil ausschalten echo stopkeepalive > /proc/nexoctrl/fwupdate/control sleep 1 echo gotobl > /proc/nexoctrl/fwupdate/control #Resultserver beenden killall -SIGTERM "ResSrv.elf" #sleep 1 #Bms Treiber beenden killall -SIGTERM "BmsDrv.elf" #Systemserver beenden killall -SIGTERM "SystemSrv.elf" #Display killall -SIGTERM "newgui" sleep 1 ps | grep -c 'ResSrv.elf' if [ "$?" -gt "2" ];then killall -9 "ResSrv.elf" fi ps | grep -c 'BmsDrv.elf' if [ "$?" -gt "2" ];then killall -9 "BmsDrv.elf" fi ps | grep -c 'SystemSrv.elf' if [ "$?" -gt "2" ];then killall -9 "SystemSrv.elf" fi ps | grep -c 'newgui' if [ "$?" -gt "2" ];then killall -9 "newgui" fi # Leistungsteil ausschalten #echo reqsync > /proc/nexoctrl/fwupdate/control #if [ "$?" -ne "0" ]; then # sleep 2 #fi echo shutdown > /proc/nexoctrl/fwupdate/control killall -SIGTERM "AblaufStrg.elf" ps | grep -c 'AblaufStrg.elf' if [ "$?" -gt "2" ];then killall -9 "AblaufStrg.elf" fi echo u > /proc/sysrq-trigger echo o > /proc/sysrq-trigger # /sbin/poweroff exit 0