Mailinglist Archive: opensuse-factory (471 mails)
| < Previous | Next > |
Re: [opensuse-factory] splashy vs bootsplash
- From: Holger Macht <hmacht@xxxxxxx>
- Date: Wed, 24 Jun 2009 16:50:52 +0200
- Message-id: <1245855052.4771.8.camel@xxxxxxxxxxxxx>
On Sat, 2009-06-13 at 19:12 +0200, Stephan Kulow wrote:
Johannes Engel (CC) already did some initial work and tests with splashy
in regard to regular booting. I remember him having problems with
parallel booting because the bootsplash interaction is hard coded in
/sbin/startpar. Attaching his /etc/rc.splash which worked (at that time)
with RUN_PARALLEL=no for reference if someone wants to pick up his work.
Regards,
Holger
# /etc/rc.splash
# vim: syntax=sh
#
# Initialize splashy progressbar variables and
# define the splashy boot script functions.
#
# Copyright 2008 Johannes Engel <jcnengel@xxxxxxxxxxxxxx>
# using the original from openSUSE 10.3 for bootsplash
# and THEME detection from splashy package by Holger Macht <hmacht@xxxxxxx>
#
SPLASH=yes
SPLASHLOG="/var/log/susesplash.log"
DUMMY=$(cat /etc/splashy/config.xml)
THEME=$(echo $DUMMY | /usr/bin/perl -p -e
's/<!--.*?-->//g;s/^.*<current_theme>//;s/<\/current_theme>.*$//;')
export SPLASH RC_SPLASH
test -x /usr/sbin/splashy -a -x /usr/sbin/splashy_update|| SPLASH=no
test -n "$THEME" -a -d "/etc/splashy/themes/$THEME" || SPLASH=no
case "$PREVLEVEL-$RUNLEVEL" in
[2-5]-[2-5]) SPLASH=no
esac
if test "$SPLASH" = "yes" ; then
if test "$1" = "B" ; then
SPLASHSTART=100
SPLASHEND=20000
for i in /etc/init.d/boot.d/S[0-9][0-9]*; do
test -x "$i" || continue
: $((SPLASHNUM++))
done
unset i
else
SPLASHSTART=0
SPLASHEND=65535
case "$PREVLEVEL-$RUNLEVEL" in
N-[3-5]) SPLASHSTART=20000 ;;
esac
for i in /etc/init.d/rc${RUNLEVEL}.d/S[0-9][0-9]*; do
test -x "$i" || continue
: $((SPLASHNUM++))
done
for i in /etc/init.d/rc${PREVLEVEL}.d/K[0-9][0-9]*; do
test -x "$i" || continue
: $((SPLASHNUM++))
done
unset i
fi
# Progress is equal to start in the beginning
SPLASHPROGRESS=$SPLASHSTART
# rc.splash is called from rc.status for every service
# So make sure SPLASHNUM has got a reasonable value
# even when we are not booting or shutting down
# i.e. splash screen is not invoked
function splashtrigger ()
{
case "$1" in
rlreached*)
[ "$2" = "B" ] || /usr/sbin/splashy_update exit 2> $SPLASHLOG #
don't stop if RL B is reached
return # do not start splashy if we are finishing
# splashy makes kbd service fail
# so we restart this service after disabling splashy
# /etc/init.d/kbd restart
;;
esac
case "$RUNLEVEL" in
0|6) pidof splashy || /usr/sbin/splashy shutdown 2> $SPLASHLOG ;;
*) pidof splashy || /usr/sbin/splashy boot 2> $SPLASHLOG ;;
esac
}
function splashprogress ()
{
local SPLASHDIFF
local SPLASHPERCENT
[ -n "$SPLASHNUM" -a "$SPLASHNUM" -ge 1 ] || SPLASHNUM=1
SPLASHDIFF=$(((SPLASHEND - SPLASHPROGRESS)/SPLASHNUM))
SPLASHPROGRESS=$((SPLASHPROGRESS+SPLASHDIFF))
SPLASHPERCENT=$((100*SPLASHPROGRESS/(SPLASHEND-SPLASHSTART)))
# [ -n "$(pidof Xorg)" -o -n "$(pidof X)" -o -n "$(pidof Xgl)" ] &&
xrunning=TRUE || xrunning=FALSE;
if [ -n "$(pidof splashy)" ]; then # splashy running, Xorg not running
# if [ $xrunning ]; then
# /usr/sbin/splashy_update exit 2> $SPLASHLOG
# else
/usr/sbin/splashy_update "progress $SPLASHPERCENT" 2>
$SPLASHLOG
/usr/sbin/splashy_update "print $1" 2> $SPLASHLOG
# fi
fi
: $((SPLASHNUM--))
}
function splashparallel ()
{
local SPLASHDIFF
local SPLASHOLDPROGRESS=$SPLASHPROGRESS
for i; do
test "$SPLASHNUM" -ge 1 || SPLASHNUM=1
SPLASHDIFF=$(((SPLASHEND-SPLASHPROGRESS)/SPLASHNUM))
SPLASHPROGRESS=$((SPLASHPROGRESS+SPLASHDIFF))
: $((SPLASHNUM--))
done
SPLASHDIFF=$((SPLASHPROGRESS-SPLASHOLDPROGRESS))
echo "-S $SPLASHOLDSTART:$SPLASHDIFF"
}
function splashmake ()
{
local SPLASHDIFF=$((SPLASHEND-SPLASHPROGRESS))
echo "-S $SPLASHSTART:$SPLASHDIFF"
SPLASHPROGRESS=$SPLASHEND
SPLASHNUM=0
}
else
function splashtrigger () { :; }
function splashprogress () { :; }
function splashparallel () { echo ""; }
function splashmake () { echo ""; }
fi
On Saturday 13 June 2009 09:40:16 Rastislav Krupanský wrote:
Someone needs to do a test with both available solutions and then we need
to judge.
Can users/volunteers do it? What is needed to test and how?
As I'm not aware of anyone working on it, I'm not aware of anything to test -
other than testing how to replace bootsplash with splashy and/or plymouth.
Johannes Engel (CC) already did some initial work and tests with splashy
in regard to regular booting. I remember him having problems with
parallel booting because the bootsplash interaction is hard coded in
/sbin/startpar. Attaching his /etc/rc.splash which worked (at that time)
with RUN_PARALLEL=no for reference if someone wants to pick up his work.
Regards,
Holger
# /etc/rc.splash
# vim: syntax=sh
#
# Initialize splashy progressbar variables and
# define the splashy boot script functions.
#
# Copyright 2008 Johannes Engel <jcnengel@xxxxxxxxxxxxxx>
# using the original from openSUSE 10.3 for bootsplash
# and THEME detection from splashy package by Holger Macht <hmacht@xxxxxxx>
#
SPLASH=yes
SPLASHLOG="/var/log/susesplash.log"
DUMMY=$(cat /etc/splashy/config.xml)
THEME=$(echo $DUMMY | /usr/bin/perl -p -e
's/<!--.*?-->//g;s/^.*<current_theme>//;s/<\/current_theme>.*$//;')
export SPLASH RC_SPLASH
test -x /usr/sbin/splashy -a -x /usr/sbin/splashy_update|| SPLASH=no
test -n "$THEME" -a -d "/etc/splashy/themes/$THEME" || SPLASH=no
case "$PREVLEVEL-$RUNLEVEL" in
[2-5]-[2-5]) SPLASH=no
esac
if test "$SPLASH" = "yes" ; then
if test "$1" = "B" ; then
SPLASHSTART=100
SPLASHEND=20000
for i in /etc/init.d/boot.d/S[0-9][0-9]*; do
test -x "$i" || continue
: $((SPLASHNUM++))
done
unset i
else
SPLASHSTART=0
SPLASHEND=65535
case "$PREVLEVEL-$RUNLEVEL" in
N-[3-5]) SPLASHSTART=20000 ;;
esac
for i in /etc/init.d/rc${RUNLEVEL}.d/S[0-9][0-9]*; do
test -x "$i" || continue
: $((SPLASHNUM++))
done
for i in /etc/init.d/rc${PREVLEVEL}.d/K[0-9][0-9]*; do
test -x "$i" || continue
: $((SPLASHNUM++))
done
unset i
fi
# Progress is equal to start in the beginning
SPLASHPROGRESS=$SPLASHSTART
# rc.splash is called from rc.status for every service
# So make sure SPLASHNUM has got a reasonable value
# even when we are not booting or shutting down
# i.e. splash screen is not invoked
function splashtrigger ()
{
case "$1" in
rlreached*)
[ "$2" = "B" ] || /usr/sbin/splashy_update exit 2> $SPLASHLOG #
don't stop if RL B is reached
return # do not start splashy if we are finishing
# splashy makes kbd service fail
# so we restart this service after disabling splashy
# /etc/init.d/kbd restart
;;
esac
case "$RUNLEVEL" in
0|6) pidof splashy || /usr/sbin/splashy shutdown 2> $SPLASHLOG ;;
*) pidof splashy || /usr/sbin/splashy boot 2> $SPLASHLOG ;;
esac
}
function splashprogress ()
{
local SPLASHDIFF
local SPLASHPERCENT
[ -n "$SPLASHNUM" -a "$SPLASHNUM" -ge 1 ] || SPLASHNUM=1
SPLASHDIFF=$(((SPLASHEND - SPLASHPROGRESS)/SPLASHNUM))
SPLASHPROGRESS=$((SPLASHPROGRESS+SPLASHDIFF))
SPLASHPERCENT=$((100*SPLASHPROGRESS/(SPLASHEND-SPLASHSTART)))
# [ -n "$(pidof Xorg)" -o -n "$(pidof X)" -o -n "$(pidof Xgl)" ] &&
xrunning=TRUE || xrunning=FALSE;
if [ -n "$(pidof splashy)" ]; then # splashy running, Xorg not running
# if [ $xrunning ]; then
# /usr/sbin/splashy_update exit 2> $SPLASHLOG
# else
/usr/sbin/splashy_update "progress $SPLASHPERCENT" 2>
$SPLASHLOG
/usr/sbin/splashy_update "print $1" 2> $SPLASHLOG
# fi
fi
: $((SPLASHNUM--))
}
function splashparallel ()
{
local SPLASHDIFF
local SPLASHOLDPROGRESS=$SPLASHPROGRESS
for i; do
test "$SPLASHNUM" -ge 1 || SPLASHNUM=1
SPLASHDIFF=$(((SPLASHEND-SPLASHPROGRESS)/SPLASHNUM))
SPLASHPROGRESS=$((SPLASHPROGRESS+SPLASHDIFF))
: $((SPLASHNUM--))
done
SPLASHDIFF=$((SPLASHPROGRESS-SPLASHOLDPROGRESS))
echo "-S $SPLASHOLDSTART:$SPLASHDIFF"
}
function splashmake ()
{
local SPLASHDIFF=$((SPLASHEND-SPLASHPROGRESS))
echo "-S $SPLASHSTART:$SPLASHDIFF"
SPLASHPROGRESS=$SPLASHEND
SPLASHNUM=0
}
else
function splashtrigger () { :; }
function splashprogress () { :; }
function splashparallel () { echo ""; }
function splashmake () { echo ""; }
fi
| < Previous | Next > |