diff options
Diffstat (limited to 'openembedded/packages/initscripts/initscripts-1.0/openzaurus/checkversion')
-rwxr-xr-x | openembedded/packages/initscripts/initscripts-1.0/openzaurus/checkversion | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/openembedded/packages/initscripts/initscripts-1.0/openzaurus/checkversion b/openembedded/packages/initscripts/initscripts-1.0/openzaurus/checkversion new file mode 100755 index 0000000000..0c8be4fc2d --- /dev/null +++ b/openembedded/packages/initscripts/initscripts-1.0/openzaurus/checkversion | |||
@@ -0,0 +1,31 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | found=`cat /proc/version | cut -d ' ' -f3` | ||
4 | echo "$found" | grep -q "snapshot" && exit 0 | ||
5 | |||
6 | if [ "VERSION" != "$found" ] ; then | ||
7 | echo -e >/dev/tty1 | ||
8 | echo -e "\033[31;1m ******************************************* \033[0m" >/dev/tty1 | ||
9 | echo -e "\033[31;1m * \033[0mW A R N I N G ! \033[31;1m* \033[0m" >/dev/tty1 | ||
10 | echo -e "\033[31;1m ******************************************* \033[0m" >/dev/tty1 | ||
11 | echo >/dev/tty1 | ||
12 | echo -e "\033[31;1m ******************************************* \033[0m" >/dev/tty1 | ||
13 | echo -e "\033[31;1m * \033[0mYou are running the wrong kernel! \033[31;1m* \033[0m" >/dev/tty1 | ||
14 | echo -e "\033[31;1m ******************************************* \033[0m" >/dev/tty1 | ||
15 | echo >/dev/tty1 | ||
16 | echo -e "You are running '" $found "'" >/dev/tty1 | ||
17 | echo -e "I expect kernel '" VERSION "'" >/dev/tty1 | ||
18 | echo >/dev/tty1 | ||
19 | echo -e "\033[31;1m ******************************************* \033[0m" >/dev/tty1 | ||
20 | echo -e "\033[31;1m * \033[0mRunning this combination is unsupported \033[31;1m* \033[0m" >/dev/tty1 | ||
21 | echo -e "\033[31;1m ******************************************* \033[0m" >/dev/tty1 | ||
22 | echo >/dev/tty1 | ||
23 | echo "I will sleep for 1 minute now. Use this chance to " >/dev/tty1 | ||
24 | echo "reboot the device and flash the proper kernel now! " >/dev/tty1 | ||
25 | echo -e >/dev/tty1 | ||
26 | echo -e "\033[31;1m ******************************************* \033[0m" >/dev/tty1 | ||
27 | echo -e "\033[31;1m * \033[0mW A R N I N G ! \033[31;1m* \033[0m" >/dev/tty1 | ||
28 | echo -e "\033[31;1m ******************************************* \033[0m" >/dev/tty1 | ||
29 | echo >/dev/tty1 | ||
30 | sleep 60 | ||
31 | fi | ||