#!/bin/sh # -*- Mode: shell-script -*- # Copyright (C) 2002 by Chmouel Boudjnah # Redistribution of this file is permitted under the terms of the GNU # Public License (GPL) # $Id$ : ${splash_dir=/usr/share/bootsplash} : ${splash_cfg=/etc/bootsplash} [[ -f /etc/sysconfig/bootsplash ]] && source /etc/sysconfig/bootsplash [[ -z $THEME ]] && THEME=Mandrake initrd_file=$1 [[ -z $initrd_file ]] && { echo "You need to specify a initrd file as argument" exit 1; } vgamode=$2 if [[ -z $vgamode || $vgamode == auto ]];then vgamode=$( $splash_dir/scripts/detect-resolution $initrd_file) fi if [[ $vgamode == 640* ]];then resolution=640x480 elif [[ $vgamode == 800* ]];then resolution=800x600 elif [[ $vgamode == 1024* ]];then resolution=1024x768 elif [[ $vgamode == 1280* ]];then resolution=1280x1024 elif [[ $vgamode == 1600* ]];then resolution=1600x1200 fi if [[ -f $splash_cfg/themes/$THEME/config/bootsplash-$resolution.cfg ]];then config=$splash_cfg/themes/$THEME/config/bootsplash-$resolution.cfg fi if [[ -f $splash_dir/themes/$THEME/lilo/message ]];then cp -f $splash_dir/themes/$THEME/lilo/message /boot/message-graphic fi if [[ -z $config ]];then echo "Can't find a config files for resolution $resolution"; exit 1; fi if [[ -x /sbin/splash ]]; then /sbin/splash -s -f $config >> $initrd_file fi if [ -z "$DURING_INSTALL" ]; then $splash_dir/scripts/switch-themes -u fi