3 # bootanim - boot animation wrapper script for fbmngplay
5 # This program parses /etc/bootsplash/[THEME]/config/bootsplash-XxY.cfg
6 # to determine the correct animation position.
8 # This program is free software; you may redistribute it under the terms
9 # of the GNU General Public License. This program has absolutely no warranty.
11 # (C) 2002,2003 SuSE Linux AG. Written by Stefan Reinauer <stepan@suse.de>
13 # See http://www.bootsplash.org/ for more information.
18 echo "usage: $0 [start|stop|kill|next] -m [-r XxY] [-d dir] mng1 [mng2..]"
22 start starts given animation
23 stop fades out all running animations
24 kill immediately stops all animations
25 next continue to next animation.
27 Options for use with start command:
28 -r XxY screen resolution to use if unable to autodetect.
29 -d dir directory containing the animation files
30 -m play multiple animations
31 mng1|mng2 animation filename(s). Specify -m if multiple.
37 if [ "$UID" -ne "0" ]; then
38 echo "$0 must be started as user root!!!"
43 THEME="No theme selected"
44 test -f /etc/sysconfig/bootsplash && . /etc/sysconfig/bootsplash
46 if [ ! -d /etc/bootsplash/themes/$THEME ]
48 echo "$0: could not find theme $THEME in /etc/bootsplash/themes."
52 MODE=`/sbin/fbresolution 2>/dev/null`
53 DIRECTORY=/etc/bootsplash/themes/$THEME/animations
60 # We fall through here.
64 killall -q -2 fbmngplay
74 killall -q -USR1 fbmngplay
79 echo " Error: illegal parameter.";
86 # We end up in bootanim start
88 TEMP=`getopt -o mr:d: -- "$@"`
96 if [ ! -d "$1" ]; then
97 echo "Not a valid directory."
110 OPTIONS="$OPTIONS -s"
116 echo "Internal Error."
122 function box() { true; } # ignore box descriptions in the config file
124 # Sourcing config file
125 if [ -f /etc/bootsplash/themes/$THEME/config/bootsplash-$MODE.cfg ]; then
126 . /etc/bootsplash/themes/$THEME/config/bootsplash-$MODE.cfg
128 echo "$0: No config file found for theme $THEME ($MODE)."
132 # echo "Dir: $DIRECTORY"
135 # echo "Pos: $ax,$ay"
136 # echo "options: $OPTIONS"
138 CMDLINE="fbmngplay -x $ax -y $ay $OPTIONS"
140 CMDLINE="$CMDLINE $DIRECTORY/$i"