summaryrefslogtreecommitdiff
path: root/packages/initscripts/initscripts-1.0/openzaurus
diff options
context:
space:
mode:
authorrjt@cambridgebroadband.com <rjt@cambridgebroadband.com>2005-02-17 14:38:38 +0000
committerrjt@cambridgebroadband.com <rjt@cambridgebroadband.com>2005-02-17 14:38:38 +0000
commita7afb1539702de9ac0270b1b6612820c90f32648 (patch)
tree8bdefe6df0cc15405f75c89a119ee5a9e337e60c /packages/initscripts/initscripts-1.0/openzaurus
parent2dbff440c61ff92a76ba40020240e7e9352eb58a (diff)
make checkversion chvt
BKrev: 4214ac6eQGjsdwSBzIyWz1nEpIj_bQ
Diffstat (limited to 'packages/initscripts/initscripts-1.0/openzaurus')
-rw-r--r--packages/initscripts/initscripts-1.0/openzaurus/checkversion31
1 files changed, 31 insertions, 0 deletions
diff --git a/packages/initscripts/initscripts-1.0/openzaurus/checkversion b/packages/initscripts/initscripts-1.0/openzaurus/checkversion
index e69de29bb2..6a871091e9 100644
--- a/packages/initscripts/initscripts-1.0/openzaurus/checkversion
+++ b/packages/initscripts/initscripts-1.0/openzaurus/checkversion
@@ -0,0 +1,31 @@
+#!/bin/sh
+found=`cat /proc/version | cut -d ' ' -f3`
+
+if [ "VERSION" != "$found" ] ; then
+ chvt 1
+ echo -e >/dev/tty1
+ echo -e "\033[31;1m ******************************************* \033[0m" >/dev/tty1
+ echo -e "\033[31;1m * \033[0mW A R N I N G ! \033[31;1m* \033[0m" >/dev/tty1
+ echo -e "\033[31;1m ******************************************* \033[0m" >/dev/tty1
+ echo >/dev/tty1
+ echo -e "\033[31;1m ******************************************* \033[0m" >/dev/tty1
+ echo -e "\033[31;1m * \033[0mYou are running the wrong kernel! \033[31;1m* \033[0m" >/dev/tty1
+ echo -e "\033[31;1m ******************************************* \033[0m" >/dev/tty1
+ echo >/dev/tty1
+ echo -e "You are running '" $found "'" >/dev/tty1
+ echo -e "I expect kernel '" VERSION "'" >/dev/tty1
+ echo >/dev/tty1
+ echo -e "\033[31;1m ******************************************* \033[0m" >/dev/tty1
+ echo -e "\033[31;1m * \033[0mRunning this combination is unsupported \033[31;1m* \033[0m" >/dev/tty1
+ echo -e "\033[31;1m ******************************************* \033[0m" >/dev/tty1
+ echo >/dev/tty1
+ echo "I will sleep for 1 minute now. Use this chance to " >/dev/tty1
+ echo "reboot the device and flash the proper kernel now! " >/dev/tty1
+ echo -e >/dev/tty1
+ echo -e "\033[31;1m ******************************************* \033[0m" >/dev/tty1
+ echo -e "\033[31;1m * \033[0mW A R N I N G ! \033[31;1m* \033[0m" >/dev/tty1
+ echo -e "\033[31;1m ******************************************* \033[0m" >/dev/tty1
+ echo >/dev/tty1
+ sleep 60
+ chvt 2
+fi