summaryrefslogtreecommitdiff
path: root/recipes/visual-boot/files/visual-boot.init
blob: ff3fedba73658631312777f8e1be48aa3f1ce263 (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
#! /bin/sh
#
# Copyright Matthias Hentges <devel@hentges.net> (c) 2006
# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license)
#
# Filename: visual-boot.init
# Date: 25-Jun-06


SRC_FILE="`basename $0 | sed "s/S[0-9][0-9]//"`"

# echo "# # # [`readlink /proc/self/fd/0`] # # #"
# echo "# # # [`readlink /proc/self/fd/1`] # # #"
# echo "# # # [`readlink /proc/self/fd/2`] # # #"
# echo "# # # [`sh -c /usr/bin/tty`] # # #"
# 
# readlink /proc/self/fd/1 | grep -q "tty1" && exit 0

chvt 2
if test -e /usr/share/visual-boot/${SRC_FILE}.raw.gz
then
	zcat /usr/share/visual-boot/${SRC_FILE}.raw.gz > /dev/fb0
else
	echo "[/usr/share/visual-boot/$SRC_FILE] not found" > /dev/tty1
fi