From a7afb1539702de9ac0270b1b6612820c90f32648 Mon Sep 17 00:00:00 2001 From: "rjt@cambridgebroadband.com" Date: Thu, 17 Feb 2005 14:38:38 +0000 Subject: make checkversion chvt BKrev: 4214ac6eQGjsdwSBzIyWz1nEpIj_bQ --- .../initscripts-1.0/openzaurus/checkversion | 31 ++++++++++++++++++++++ packages/initscripts/initscripts_1.0.bb | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) 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 diff --git a/packages/initscripts/initscripts_1.0.bb b/packages/initscripts/initscripts_1.0.bb index d5728c1e86..4e7d5df89c 100644 --- a/packages/initscripts/initscripts_1.0.bb +++ b/packages/initscripts/initscripts_1.0.bb @@ -6,7 +6,7 @@ DEPENDS = "makedevs" DEPENDS_openzaurus = "makedevs virtual/kernel" RDEPENDS = "makedevs" LICENSE = "GPL" -PR = "r33" +PR = "r34" SRC_URI = "file://halt \ file://ramdisk \ -- cgit v1.2.3