我们可以修改这个文件中的一些选项来得到自己想要的效果。具体选项的含义可以查看:http://www.bootsplash.org/config.html
# name of the picture file (full path recommended)
jpeg=/etc/bootsplash/themes/NewLinux/images/bootsplash-800x600.jpg
silentjpeg=/etc/bootsplash/themes/NewLinux/images/silent-800x600.jpg
这两行指定了作为启动动画的图片和控制台背景的图片的名字和绝对路径,我们只需把自己制作的图片命名为这里指定的图片,并且放在这个路径下,就可以应用自己的主题了。(想想看,制作themes是相当简单的。不明白为什么网上没有redhat linux的主题图片。)
我修改了/etc/bootsplash/themes/NewLinux/config/bootsplash-800x600.cfg文件,定义显示文本信息区域。###部分是我添加的内容。
我现在的/etc/rc.d/splash.sh脚本,删除了原来放在这个脚本中的绘制进度条部分(调试不成功)和播放动画部分(还没有实验),以及不适用于red hat linux的一些命令。这个脚本现在只打印类似“booting the system"和"shutting down the system"的信息和实现关机时的silent mode。
#!/bin/bash
#
# splash.sh - This shell script triggers bootsplash actions during
# system boot/shutdown. It can be run by the init scripts repeatedly
# specifying the currently executed system script.
#
#rewrite this script at the base of offered by http://www.bootsplash.org
#line with ### added by me
_procsplash="`cat /proc/splash 2>;/dev/null`"
###give the variable "THEME" the name of the directory which the current
###silent mode picture stored
THEME="NewLinux"
test ! -d "/etc/bootsplash/themes/$THEME" && exit 0
# assertions
test -r /proc/splash || exit 0
test -z "`echo $_procsplash|grep on`" && exit 0
####"Yast" is a utilies for SuSE Linux,no for RedHat Linux
####maybe we can erase it
test "$1" == "bootnetwork stop" -o "$1" == "YaST" && exit 0 # no progress
# We chose verbose in grub
test "`cat /proc/cmdline |grep \"splash=silent\"`" == "" && exit 0
if [ "$PREVLEVEL" == "3" -o "$PREVLEVEL" == "5" ]; then
###no below ,no silent mode when shutting down
if [ "$RUNLEVEL" = "3" -o "$RUNLEVEL" == "5" ]; then
exit 0
fi
### but why ?
fi
# acquire data
#
_shutdown="no"
_silent="no"
test "`cat /proc/splash |grep silent`" && _silent="yes"
test "$RUNLEVEL" == "6" -o "$RUNLEVEL" == "0" && _shutdown="yes"
test -f "/etc/bootsplash/themes/$THEME/config/bootsplash-`fbresolution`.cfg" && \
下面来看rc脚本(此为系统脚本,决定runlevel和kill or start services,修改前要备份一下,到时要改回来只要覆盖一下就好了cp rc.bak rc)。下面是我现在的/etc/rc.d/rc脚本,定义一个函数,for循环中调用它,以绘制启动进度。重新写了几行代码,绘制进度条。以运行级下的服务总个数和已经启动的服务个数之比作为progress bar的进度,这样进度条显得均匀了一些。
现在这个可以实现以下功能,开机silent模式,有开始画面,有进度条,进度条下有booting system 提示。关机时切换到silent模式,有画面。提示shutting down the system.
[/code]作者: foruok 时间: 2005-05-28 21:46 标题: RedHat Linux9下用bootsplash制作全图形启动界面 现在这个可以实现以下功能,开机silent模式,有开始画面,有进度条,进度条下有booting system 提示。关机时切换到silent模式,有画面。提示shutting down the system.