blob: 22b1a038c18ba266af6c1c6c05fe2dac9032c8c8 (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#!/bin/sh
# -*- Mode: shell-script -*-
# Copyright (C) 2002 by Chmouel Boudjnah <chmouel@mandrakesoft.com>
# Redistribution of this file is permitted under the terms of the GNU
# Public License (GPL)
# $Id$
: ${splash_dir=/usr/share/bootsplash}
[[ -f /etc/sysconfig/bootsplash ]] && source /etc/sysconfig/bootsplash
[[ -z $THEME ]] && THEME=Mandriva
[ $# = 2 ] || { echo "usage: $0 <initrd> <resolution>"; exit 1; }
initrd_file=$1
vgamode=$2
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
else
echo "unknown resolution \"$vgamode\""
[ "$vgamode" = "auto" ] && echo 'resolution "auto" is not handled anymore'
exit 1
fi
rm -f $splash_dir/themes/current
ln -s $THEME $splash_dir/themes/current
$splash_dir/scripts/add-boot-splash-raw $initrd_file $resolution $THEME || exit 1
if [ -z "$DURING_INSTALL" ]; then
$splash_dir/scripts/switch-themes -u
fi
|