-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathofgwrite_test
More file actions
executable file
·53 lines (46 loc) · 1.57 KB
/
ofgwrite_test
File metadata and controls
executable file
·53 lines (46 loc) · 1.57 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh
echo "Test 1: Remount read only"
mount -o ro,remount /
if [ $? -ne 255 ]
then
echo "successful"
echo "Online flash should work without problems"
echo "At best reboot box with \"reboot\""
# exit
fi
echo ""
echo "Test 2: init 2 and kill known problem processes"
init 2
killall nmbd > /dev/null 2>&1
killall smbd > /dev/null 2>&1
killall rpc.mountd > /dev/null 2>&1
killall rpc.statd > /dev/null 2>&1
/etc/init.d/softcam stop > /dev/null 2>&1
killall CCcam > /dev/null 2>&1
pkill -9 -f '[Oo][Ss][Cc][Aa][Mm]' > /dev/null 2>&1
ps w | grep -i oscam | grep -v grep | awk '{print $1}'| xargs kill -9 > /dev/null 2>&1
pkill -9 -f '[Ww][Ii][Cc][Aa][Rr][Dd][Dd]' > /dev/null 2>&1
ps w | grep -i wicardd | grep -v grep | awk '{print $1}'| xargs kill -9 > /dev/null 2>&1
killall kodi.bin > /dev/null 2>&1
killall hddtemp > /dev/null 2>&1
killall transmission-daemon > /dev/null 2>&1
killall openvpn > /dev/null 2>&1
/etc/init.d/sabnzbd stop > /dev/null 2>&1
pkill -9 -f cihelper > /dev/null 2>&1
pkill -9 -f ciplus_helper > /dev/null 2>&1
pkill -9 -f ciplushelper > /dev/null 2>&1
pkill -f vmc.sh > /dev/null 2>&1
pkill -f DBServer.py > /dev/null 2>&1
sleep 10
mount -o ro,remount /
if [ $? -ne 255 ]
then
echo "successful"
echo "Online flash should work without problems"
echo "At best reboot box with \"reboot\""
exit
fi
echo "Online flash will most likely abort"
echo "List of open files:"
lsof | grep -v pipe: | grep -v socket: | grep -v anon_inode: | grep -v /dev/ | grep -v /var/volatile | grep -v /proc/ | grep -v "/media"
echo "At best reboot box with \"reboot\""