Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 21368 Details for
Bug 21019
[bootsplash] suggestion for progress bar implementation
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for bootsplash tarball
tarball.patch (text/plain), 5.62 KB, created by
Tyler Trafford
on 2003-11-27 09:41:05 UTC
(
hide
)
Description:
patch for bootsplash tarball
Filename:
MIME Type:
Creator:
Tyler Trafford
Created:
2003-11-27 09:41:05 UTC
Size:
5.62 KB
patch
obsolete
>diff -Naur bootsplash-0.6-r2/misc/bootsplash bootsplash-0.6-r3/misc/bootsplash >--- bootsplash-0.6-r2/misc/bootsplash 2003-11-27 12:30:49.076495440 -0500 >+++ bootsplash-0.6-r3/misc/bootsplash 2003-11-27 12:31:28.450509680 -0500 >@@ -31,7 +31,7 @@ > # switch to a usable image on all consoles > for TTY in `seq 0 5` > do >- /sbin/splash -s -u $TTY /etc/bootsplash/${BOOTSPLASH_THEME}/config/bootsplash-${RESOLUTION}.cfg >+ /sbin/splash -s -u $TTY -n /etc/bootsplash/${BOOTSPLASH_THEME}/config/bootsplash-${RESOLUTION}.cfg > done > > eend $? "Failed to set frame buffer console images" >diff -Naur bootsplash-0.6-r2/misc/splash bootsplash-0.6-r3/misc/splash >--- bootsplash-0.6-r2/misc/splash 1969-12-31 19:00:00.000000000 -0500 >+++ bootsplash-0.6-r3/misc/splash 2003-08-13 05:12:01.000000000 -0400 >@@ -0,0 +1,189 @@ >+#!/bin/bash >+# >+# splash - script to paint progress bar during >+# system startup/shutdown. This script is solely run >+# by the init scripts (shell function splash_update) >+# >+# (w) 2002-2003 Stefan Reinauer, <stephan@suse.de> >+# It's licensed under GPL, of course. >+# >+# modified by Michael Aichler, <micha at aichler dot net> >+# >+# this script expects the following environment variables: >+# pb_init = the current status of the progress bar >+# pb_count = number of currently executed start/stop script >+# pb_scripts = number of scripts to be executed for runlevel change >+# pb_rate = the progress bar rate of the current boot process >+# RUNLEVEL = runlevel to be reached >+# >+# execute splash binary utility because we are a wrapper >+# >+if [ "$1" == "-s" -o "$1" == "-u" -o "$1" == "-n" -o "$1" == "-f" ]; then >+ exec /sbin/splash.bin $* >+fi >+ >+function box() { true; } >+ >+# >+# assertions >+# >+test -r /proc/splash || exit 1 >+test -z "`cat /proc/splash 2>/dev/null | grep on`" && exit 1 >+test -z "$pb_count" -a -z "$pb_scripts" && DBZ="yes" >+test "$RUNLEVEL" == "6" -o "$RUNLEVEL" == "0" && SHUTDOWN="yes" >+# >+# Source bootsplash config file >+# >+test -f /etc/conf.d/bootsplash.conf && . /etc/conf.d/bootsplash.conf >+test -z "$BOOTSPLASH_THEME" && BOOTSPLASH_THEME="default" >+test -z "${BOOTSPLASH_TTYS}" && BOOTSPLASH_TTYS="0" >+# >+# Get theme name from kernel command line >+# >+for param in `grep "theme=" /proc/cmdline`; do >+ if [ "${param%=*}" == "theme" ]; then >+ BOOTSPLASH_THEME="${param#*=}" >+ fi >+done >+# >+# Source theme config file >+# >+if [ ! -x /sbin/fbresolution ]; then >+ echo "$0: '/sbin/fbresolution' does not exist on your system... aborting !" >+else >+ res="$(/sbin/fbresolution)" >+fi >+ >+config="/etc/bootsplash/${BOOTSPLASH_THEME}/config/bootsplash-${res}.cfg" >+ >+if [ ! -f "$config" ]; then >+ echo "$0: Can't find config file '$config'... aborting !" >+ exit 1 >+else >+ source "$config" >+fi >+ >+# >+# void splash_start (const char* config_path) >+# >+splash_start() { >+ /sbin/splash -s -u 0 "$1" >+ echo "silent" > /proc/splash >+ /usr/bin/chvt 1 >+} >+# >+# void splash_stop (const char* config_path) >+# >+splash_stop() { >+ /sbin/bootanim kill >+ /sbin/splash -s -u 0 -n "$1" >+ exit 0 >+} >+# >+# void print_text (void) >+# >+print_text() { >+ text="Booting the system... Press F2 for verbose mode" >+ [ -n "${PROGRESS_BOOT_MESSAGE}" ] && text="${PROGRESS_BOOT_MESSAGE}" >+ >+ if [ "${SHUTDOWN}" == "yes" ]; then >+ text="Shutting down the system... Press F2 for verbose mode" >+ [ -n "${PROGRESS_SHUTDOWN_MESSAGE}" ] && text="${PROGRESS_SHUTDOWN_MESSAGE}" >+ >+ if [ "${RUNLEVEL}" == "6" ]; then >+ text="Rebooting the system... Press F2 for verbose mode" >+ [ -n "${PROGRESS_REBOOT_MESSAGE}" ] && text="${PROGRESS_REBOOT_MESSAGE}" >+ fi >+ fi >+ >+ if [ -n "$text_x" -a -n "$text_y" -a -n "$text_color" -a -n "$text_size" ] >+ then >+ options="-x $text_x -y $text_y -t $text_color -s $text_size" >+ if [ -n "${BOOTSPLASH_FONT}" -a -f "/etc/bootsplash/${BOOTSPLASH_FONT}" ] >+ then >+ options="$options -f \"/etc/bootsplash/${BOOTSPLASH_FONT}\"" >+ fi >+ >+ eval "/sbin/fbtruetype.static $options \"$text\"" >+ fi >+} >+# >+# void paint_progress (void) >+# >+paint_progress() { >+ if [ "$DBZ" != "yes" -a -n "$progress_enable" ]; then >+ progress=$(($pb_init + ($pb_count + 1) * ($pb_rate - $pb_init) / $pb_scripts)) >+ echo "show $progress" > /proc/splash >+ fi >+} >+ >+ >+# >+# Start silent splash on system shutdown/reboot >+# >+if [ "$*" == "start" ]; then >+ if [ -n "`grep \"splash=silent\" /proc/cmdline 2>/dev/null`" ]; then >+ splash_start "$config" >+ paint_progress >+ print_text >+ fi >+# >+# Stop on errors >+# >+elif [ "$*" == "stop" ]; then >+ if [ "${BOOTSPLASH_STOP_ON_ERROR}" == "yes" ]; then >+ splash_stop "$config" >+ fi >+# >+# Print the currently used theme >+# >+elif [ "$*" == "theme" ]; then >+ echo "$BOOTSPLASH_THEME" >+# >+# Print the currently used config file >+# >+elif [ "$*" == "config" ]; then >+ echo "$config" >+# >+# Show boot/shutdown/reboot message >+# >+elif [ "$*" == "text" ]; then >+ print_text >+# >+# Set verbose splash and fade out animations >+# if booting has finished >+# >+elif [ "$*" == "master" ]; then >+ echo "show $pb_rate" > /proc/splash >+ /sbin/bootanim stop && sleep 1 >+ for tty in ${BOOTSPLASH_TTYS}; do >+ /sbin/splash -s -u $tty -n $config >+ done >+else >+ # >+ # Do not display anything if F2 was pressed. >+ # >+ if [ -z "`grep \"silent\" /proc/splash 2> /dev/null`" ]; then >+ if [ -n "`/bin/ps ax | grep fbmngplay | grep -v grep`" ]; then >+ splash_stop >+ fi >+ exit 0 >+ fi >+ # >+ # Start animations here, if there's any config >+ # (because of a hard coded path in splash.c) >+ # >+ if [ -f /etc/bootsplash/${BOOTSPLASH_THEME}/config/animations.cfg ]; then >+ while read line; do >+ if [ "${line%:*}" == "$*" ]; then >+ eval "${line#*:}" >+ fi >+ done < /etc/bootsplash/${BOOTSPLASH_THEME}/config/animations.cfg >+ fi >+ # >+ # Print text string and paint progress bar >+ # >+ paint_progress >+fi >+ >+exit 0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 21019
:
19330
|
19335
|
19344
|
19366
| 21368 |
21369