summaryrefslogtreecommitdiff
path: root/filesystem/etc/rc.d/rc.shutdown
blob: adc4e3ab56f22d6b3b9ee7c8d01640a41ea4fee7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
export DISPLAY=:0
killall power_manager
killall -9 udevd
#killall -9 system_server
killall -9 xinit

rm -rf /tmp/vip/*                                                               
rm -rf /tmp/permanent/* 

echo "Run Shutdown animation..."
nice -n -15 /usr/bin/boot-animation --offmsg " " &
sleep 1

echo "Stopping menu screen..."  
killall -9 menu_screen  

echo "Stopping all applications..."  
/usr/bin/enter_deepsleep  

echo "Stopping indicator..."
killall -9 indicator

value=1
while [&value != "0"];
do
 value='vconftool get memory/boot_animation/finished | awk '{print $4}''
 sleep 0.5
done
sleep 1
echo "Turn off LCD after finishing boot-animation"
xset dpms force off

# factory resetting...
# flag set by factory-reset.sh
if [ -f /opt/.factoryreset ]; then
	/usr/bin/run-factory-reset.sh
fi

#echo 4 > /sys/class/graphics/fb0/blank