aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2009-10-07 12:11:30 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2009-10-07 12:11:30 +0000
commit7bb898ed0ebbabd52461449088033994ec2579ee (patch)
tree5530959162662106bcc1e11e277caf0f8434d735
parent516cfbeee4cd353abc3e9237261e14b11b84771c (diff)
remove obsolete scripts
-rw-r--r--scripts/Makefile10
-rw-r--r--scripts/bootanim141
-rw-r--r--scripts/splash.sh297
3 files changed, 4 insertions, 444 deletions
diff --git a/scripts/Makefile b/scripts/Makefile
index 44686b0..aa0189e 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -1,6 +1,5 @@
PL=remove-boot-splash
SH=make-boot-splash make-boot-splash-raw rewritejpeg switch-themes remove-theme
-SBIN=splash.sh bootanim
SYS=bootsplash.sysconfig
sharedir=/usr/share
@@ -9,14 +8,13 @@ etcsysdir=/etc/sysconfig
all: check
check:
- @for i in $(SH) $(SBIN);do /bin/bash -n $$i || exit 1;echo $$i syntax OK;done
+ @for i in $(SH);do /bin/bash -n $$i || exit 1;echo $$i syntax OK;done
@for i in $(PL);do perl -c $$i ||exit 1;done
install:
- @mkdir -p $(prefix)$(sharedir)/bootsplash/scripts/ $(prefix)$(etcsysdir) $(prefix)/sbin/
- @for i in $(SH) $(PL);do install -m755 $$i $(prefix)$(sharedir)/bootsplash/scripts/;done
- @for i in $(SBIN);do install -m755 $$i $(prefix)/sbin/;done
- install -m644 bootsplash.sysconfig $(prefix)$(etcsysdir)/bootsplash
+ @mkdir -p $(prefix)$(sharedir)/mandriva-theme-utils/scripts/ $(prefix)$(etcsysdir)
+ @for i in $(SH) $(PL);do install -m755 $$i $(prefix)$(sharedir)/mandriva-theme-utils/scripts/;done
+ install -m644 $(SYS) $(prefix)$(etcsysdir)/theme
clean:
rm -f *~ \#*\#
diff --git a/scripts/bootanim b/scripts/bootanim
deleted file mode 100644
index c850081..0000000
--- a/scripts/bootanim
+++ /dev/null
@@ -1,141 +0,0 @@
-#!/bin/bash
-#
-# bootanim - boot animation wrapper script for fbmngplay
-#
-# This program parses /etc/bootsplash/[THEME]/config/bootsplash-XxY.cfg
-# to determine the correct animation position.
-#
-# This program is free software; you may redistribute it under the terms
-# of the GNU General Public License. This program has absolutely no warranty.
-#
-# (C) 2002,2003 SuSE Linux AG. Written by Stefan Reinauer <stepan@suse.de>
-#
-# See http://www.bootsplash.org/ for more information.
-#
-
-usage()
-{
- echo "usage: $0 [start|stop|kill|next] -m [-r XxY] [-d dir] mng1 [mng2..]"
- cat << EOF
-
- Available commands:
- start starts given animation
- stop fades out all running animations
- kill immediately stops all animations
- next continue to next animation.
-
- Options for use with start command:
- -r XxY screen resolution to use if unable to autodetect.
- -d dir directory containing the animation files
- -m play multiple animations
- mng1|mng2 animation filename(s). Specify -m if multiple.
-
-EOF
-
-}
-
-if [ "$UID" -ne "0" ]; then
- echo "$0 must be started as user root!!!"
- echo "Exiting..."
- exit 1
-fi
-
-THEME="No theme selected"
-test -f /etc/sysconfig/bootsplash && . /etc/sysconfig/bootsplash
-
-if [ ! -d "/etc/bootsplash/themes/$THEME" ]
-then
- echo "$0: could not find theme $THEME in /etc/bootsplash/themes."
- exit 0
-fi
-
-MODE=`/bin/fbresolution 2>/dev/null`
-DIRECTORY=/etc/bootsplash/themes/$THEME/animations
-OPTIONS="-b -c 1"
-FILES=""
-
-case "$1" in
-start)
- # echo "$0 start"
- # We fall through here.
- ;;
-stop)
- # echo "$0 stop"
- killall -q -2 fbmngplay
- exit 0
- ;;
-kill)
- # echo "$0 kill"
- killall -q fbmngplay
- exit 0
- ;;
-next)
- # echo "$0 next"
- killall -q -USR1 fbmngplay
- exit 0
- ;;
-*)
- usage;
- echo " Error: illegal parameter.";
- exit 1
- ;;
-esac
-
-shift
-
-# We end up in bootanim start
-
-while getopts mr:d opt "$@"
- do
- # echo "loop: $*"
- case "$opt" in
- d) # directory
- shift
- if [ ! -d "$1" ]; then
- echo "Not a valid directory."
- exit 1
- fi
- DIRECTORY=$1
- shift
- ;;
- r) # resolution
- shift
- MODE=$1;
- shift
- ;;
- m) # multiple files
- shift
- OPTIONS="$OPTIONS -s"
- ;;
- -) # end
- shift
- break;;
- *) # Weird
- echo "Internal Error."
- exit 1
- ;;
- esac
-done
-
-function box() { true; } # ignore box descriptions in the config file
-
-# Sourcing config file
-if [ -f /etc/bootsplash/themes/$THEME/config/bootsplash-$MODE.cfg ]; then
- . /etc/bootsplash/themes/$THEME/config/bootsplash-$MODE.cfg
-else
- echo "$0: No config file found for theme $THEME ($MODE)."
- exit 1
-fi
-
-# echo "Dir: $DIRECTORY"
-# echo "Files: $*"
-# echo "Mode: $MODE"
-# echo "Pos: $ax,$ay"
-# echo "options: $OPTIONS"
-
-CMDLINE="fbmngplay -x $ax -y $ay $OPTIONS"
-for i in $*; do
- CMDLINE="$CMDLINE $DIRECTORY/$i"
-done
-
-eval "$CMDLINE &"
diff --git a/scripts/splash.sh b/scripts/splash.sh
deleted file mode 100644
index 0b34856..0000000
--- a/scripts/splash.sh
+++ /dev/null
@@ -1,297 +0,0 @@
-#!/bin/bash
-#
-# splash.sh - script to paint progress bar during
-# system startup/shutdown. This script is solely run
-# by the init scripts (shell function rc_splash)
-#
-# (w) 2002-2003 Stefan Reinauer, <stepan@suse.de>
-# 2003 Florent Villard, <warly@mandrakesoft.com>
-# It's licensed under GPL, of course.
-#
-# this script expects the following environment variables:
-# nbservices = number of start/stop scripts to be executed for runlevel change
-# progress = number of currently executed start/stop script
-# runlevel = runlevel to be reached.
-
-TEXTDOMAIN=bootsplash
-TEXTDOMAINDIR=/etc/locale
-LOCPATH=/etc/locale
-
-service=$1
-
-# 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 $*
-else
- ( exec /sbin/splash "$*" )
-fi
-
-gprintf() {
- # request translations to be always in UTF-8
- if [ -x /bin/gettext -a -n "$1" ]; then
- if [ -n "$GP_LANG" ]; then
- TEXT=`OUTPUT_CHARSET=UTF-8 LANGUAGE=$GP_LANG LC_ALL=$GP_LANG gettext -e --domain=$TEXTDOMAIN "$1"`
- else
- TEXT=`OUTPUT_CHARSET=UTF-8 gettext -e --domain=$TEXTDOMAIN "$1"`
- fi
- else
- TEXT=$1
- fi
- [ "${1#*\\n}" ] || TEXT="$TEXT\n"
-}
-
-bootsplash_run() {
- [ "$splash_mode" = "bootsplash" ] && /sbin/splash $*
-}
-
-bootsplash_write() {
- [ "$splash_mode" = "bootsplash" ] && echo $* > /proc/splash
-}
-
-splashy_is_running() {
- [ -e /dev/.splashy.pid ]
-}
-
-splashy_check() {
- [ "$splash_mode" != "splashy" ] || splashy_is_running || exit 0
-}
-
-splashy_exit() {
- if [ "$splash_mode" = "splashy" ]; then
- splashy_is_running && /sbin/splashy_update exit 2>/dev/null
- clear >/dev/tty8
- [ "$runlevel" != "5" ] && [ "x$SPEEDBOOT" != "xyes" ] && chvt 1
- fi
-}
-
-update_progress() {
- if [ "$splash_mode" = "bootsplash" ]; then
- bootsplash_write "show $(( 65534 * ( $progress + 1 ) / $num ))"
- elif [ "$splash_mode" = "splashy" ]; then
- /sbin/splashy_update "progress $(( 100 * $progress / $nbservices ))" 2>/dev/null
- fi
-}
-
-# assertions
-[ -z "$splash_rc" -o "$splash_rc" = "no" ] && exit 0
-
-if [[ -z $res ]]; then
- res=`fbresolution`
- if [[ -f /etc/sysconfig/bootsplash ]]; then
- . /etc/sysconfig/bootsplash
- theme=$THEME
- tmpval=$LOGO_CONSOLE
- if [[ -f /etc/bootsplash/themes/$theme/config/bootsplash-$res.cfg ]]; then
- function box() { true; }
- . /etc/bootsplash/themes/$theme/config/bootsplash-$res.cfg
- fi
- if [[ $tmpval != "theme" ]];then
- LOGO_CONSOLE=$tmpval
- fi
- fi
-fi
-
-_shutdown="no"
-_silent="no"
-if grep -q silent /proc/cmdline 2>/dev/null ; then
- if [ "$splash_mode" = "splashy" ]; then
- _silent="yes"
- elif [ "$splash_mode" = "bootsplash" ] && grep -q silent /proc/splash 2>/dev/null ; then
- _silent="yes"
- fi
-fi
-test "$runlevel" == "6" -o "$runlevel" == "0" && _shutdown="yes"
-
-if [ "$1" == "verbose" ]; then
- bootsplash_write 'verbose'
-fi
-
-if [ "$1" == "dm" -a "$splash_mode" = "splashy" -a "$rc_mode" = "S" ]; then
- splashy_exit
- exit 0
-fi
-
-if [ "$1" == "stop" -a $_shutdown == "no" ]; then
- if [ "$splash_mode" = "splashy" ]; then
- splashy_exit
- exit 0
- fi
- if [[ $LOGO_CONSOLE == No ]] || [[ $LOGO_CONSOLE == no ]] || [[ $LOGO_CONSOLE == NO ]]; then
- bootsplash_write 0
- exit 0
- else
- if [[ $LOGO_CONSOLE == vt ]]; then
- for i in 0 1 2 3 4 5
- do
- if [[ -f /etc/bootsplash/themes/$theme/config/vt$i-$res.cfg ]]; then
- bootsplash_run -s -u $i /etc/bootsplash/themes/$theme/config/vt$i-$res.cfg
- fi
- done
- fi
- fi
-fi
-
-test -z "$progress" -a -z "$nbservices" && exit 0
-grep -vq "splash=silent" /proc/cmdline 2>/dev/null && exit 0
-
-if [ "$previous" == "3" -o "$previous" == "5" ] ; then
- if [ "$runlevel" = "3" -o "$runlevel" == "5" ] ; then
- exit 0
- fi
-fi
-
-# acquire data
-#
-num=$(( $nbservices + 2 ))
-
-# Initialize and print text string..
-if [ "$progress" == 1 -o "$1" == "start" -o "$1" == "suspend" -o -f /dev/.splashy_shutdown ]; then
-
- [ ! -f /dev/.splashy_shutdown ] || /sbin/splashy_update test 2>/dev/null || exit 0
- # depending on the languages, we need to use a font different of
- # the default one; in such case the font must be accessible, or
- # the translation is disabled.
- # bugs:
- # - RTL languages need a fake *.po file, where bidi reordering and
- # shaping is already done.
- # - indic languages have not shaping
- # - some indic fonts don't have ascii glyphs; so the corresponding
- # languages have to be disabled (I added a '_' in front) until they are
- # fully translated.
- if [ -n "$FONT" ] ; then
- font="$FONT"
- else
- case "${GP_LANG}${LANGUAGE}" in
- # Azeri needs the schwa, which is not yet in Nimbus Sans L
- az*)
- font=/usr/share/fonts/otf/mdk/mdk_teams.otf ;;
- # languages written in latin that use letters not included in luxi
- cy*|gn*|vi*)
- font=/usr/share/fonts/default/Type1/n019023l.pfb ;;
- # basic cyrillic, covered by cp1251
- be*|bg*|mk*|ru*|sr*|uk*)
- font=/usr/share/fonts/default/Type1/n019023l.pfb ;;
- # extended cyrillic, not covered by cp1251
- kk*|ky*|mn*|tg*|uz*)
- font=/usr/share/fonts/default/Type1/n019023l.pfb ;;
- # other scripts
- am*) font=/usr/share/fonts/TTF/ethiopic/gfzemenu.ttf ;;
- ber*) font=/usr/share/fonts/TTF/tifinagh/hapaxber.ttf ;;
- ar*) font=/usr/share/fonts/TTF/arabic/Kacst-Qr.ttf ;;
- fa*) font=/usr/share/fonts/TTF/arabic/farsi/nazli.ttf ;;
- ur*) font=/usr/share/fonts/TTF/arabic/nastaliq_unicode.ttf ;;
- as*|bn*) font=/usr/share/fonts/TTF/bengali/MuktiNarrow.ttf ;;
- el*) font=/usr/share/fonts/type1/greek/Kerkis-Italic.pfb ;;
- # this font doesn't has ascii chars
- _gu*) font=/usr/share/fonts/ttf/gujarati/padmaa-Bold-0.5.ttf ;;
- he*|yi*) font=/usr/share/fonts/Type1/hebrew/NachlieliCLM-Bold.pfb ;;
- # this font doesn't has ascii chars
- hi*|_mr*) font=/usr/share/fonts/TTF/devanagari/raghu.ttf ;;
- hy*) font=/usr/share/fonts/TTF/armenian/artsnk_b.ttf ;;
- ja*) font=/usr/share/fonts/TTF/japanese/umeplus-gothic.ttf ;;
- # this font doesn't has ascii chars
- _kn*) font=/usr/share/fonts/TTF/kannada/Sampige.ttf ;;
- ko*) font=/usr/share/fonts/TTF/korean/UnDotum.ttf ;;
- # we don't ship any ttf font for Lao yet
- _lo*) font=/usr/share/fonts/ttf/lao/xxxx.ttf ;;
- ml*) font=/usr/share/fonts/otf/mdk/malayalam.ttf ;;
- # this font doesn't has ascii chars
- pa_IN*) font=/usr/share/fonts/TTF/lohit/lohit_pa.ttf ;;
- # using tscii font as currently there isn't shaping
- ta*) font=/usr/share/fonts/TTF/tscii/tscava.ttf ;;
- th*) font=/usr/share/fonts/TTF/thai/Norasi.ttf ;;
- zh*) font=/usr/share/fonts/TTF/chinese/uming.ttc ;;
- # languages supported by the default font; latin1
- af*|br*|ca*|da*|de*|es*|et*|eu*|fi*|fr*|fur*|ga*|gl*|id*|is*|it*|li*)
- font=default ;;
- # languages supported by the default font; latin1, more
- ms*|nb*|nds*|nl*|nn*|no*|oc*|ph*|pt*|sc*|sv*|tl*|wa*)
- font=default ;;
- # languages supported by the default font; latin2
- bs*|cs*|hr*|hu*|pl*|ro*|sk*|sl*|sq*|tk*)
- font=default ;;
- # languages supported by the default font; other latin coverages
- eo*|ku*|lt*|lv*|mt*|tr*)
- font=default ;;
- # for others, we do a last chance possibility with
- # Code2000, if the user installed it...
- *) font=/usr/lib/X11/fonts/drakfont/ttf/code2000.ttf ;;
- esac
- fi
-
- if [ "$font" != "default" ]; then
- if [ -r "$font" ]; then
- custom_font="-f $font"
- elif [ -r "/etc/locale/`basename $font`" ]; then
- custom_font="-f /etc/locale/`basename $font`"
- elif [ -r "/etc/locale/default.ttf" ]; then
- custom_font="-f /etc/locale/default.ttf"
- elif [ -r "/usr/lib/X11/fonts/drakfont/ttf/code2000.ttf" ]; then
- custom_font="-f usr/lib/X11/fonts/drakfont/ttf/code2000.ttf"
- elif [ -r "/usr/lib/X11/fonts/drakfont/ttf/arialuni.ttf" ]; then
- custom_font="-f usr/lib/X11/fonts/drakfont/ttf/arialuni.ttf"
- else
- # no font available, translations are not done
- GP_LANG=C ;
- LANGUAGE=C ;
- fi
-
- # some fonts need a bigger size to have a nice display
- case "$custom_font" in
- *norasi_b.ttf) text_size=$(( $text_size + 6 )) ;;
- *Kacst-Qr.ttf|*nazli.ttf|*nastaliq_unicode.ttf) text_size=$(( $text_size + 6 )) ;;
- # sizes lower than 22 display as noise in FB
- *umeplus-gothic.ttf) if [ "$text_size" -lt "22" ]; then text_size=22 ; fi ;;
- *uming.ttc) if [ "$text_size" -lt "22" ]; then text_size=22 ; fi ;;
- esac
- fi
-
- if test "$_shutdown" == "yes" -o -f /dev/.splashy_shutdown ; then
- gprintf "Shutting down the system..."
- if [ "$splash_mode" = "bootsplash" ]; then
- [[ -f /etc/bootsplash/themes/$theme/config/bootsplash-$res.cfg ]] && bootsplash_run -s -u 0 /etc/bootsplash/themes/$theme/config/bootsplash-$res.cfg
- bootsplash_write "silent"
- chvt 1
- elif [ "$splash_mode" = "splashy" -a ! -f /dev/.splashy_shutdown ]; then
- /sbin/splashy_chvt 8
- /sbin/splashy shutdown 2> /dev/null
- pidof splashy > /dev/.splashy.pid
- cat /dev/.splashy.pid >> /var/run/sendsigs.omit
- touch /dev/.splashy_shutdown
- fi
- elif [ "$1" == "suspend" ]; then
- gprintf "Suspending the system..."
- if [ "$splash_mode" = "bootsplash" ]; then
- [[ -f /etc/bootsplash/themes/$theme/config/hibernate-$res.cfg ]] && bootsplash_run -s -u 0 /etc/bootsplash/themes/$theme/config/hibernate-$res.cfg
- bootsplash_write "silent"
- chvt 1
- elif [ "$splash_mode" = "splashy" -a ! -f /dev/.splashy_shutdown ]; then
- /sbin/splashy_chvt 8
- /sbin/splashy shutdown 2> /dev/null
- pidof splashy > /dev/.splashy.pid
- fi
- else
- splashy_check
- if [ "$font" != "default" -a "$progress" != "1" -a -d /usr/share/bootsplash -a "$_silent" == "yes" ]; then
- if [[ -f /etc/bootsplash/themes/$theme/config/bootsplash-$res.cfg ]]; then
- bootsplash_run -s -u 0 /etc/bootsplash/themes/$theme/config/bootsplash-$res.cfg
- update_progress
- fi
- fi
- gprintf "Booting the system..."
- fi
- _boot=$TEXT
- if [ "$text_x" != "" -a "$text_y" != "" \
- -a "$text_color" != "" -a "$text_size" != "" -a "$_silent" == "yes" -o "$_shutdown" == "yes" -o "$1" == "suspend" ]; then
- gprintf "Press Esc for verbose mode."
- splashy_is_running && /sbin/splashy_update test 2>/dev/null || exit 0
- fbtruetype.static -x $text_x -y $text_y -t $text_color -s $text_size \
- $custom_font "$_boot $TEXT"
- rm -f /dev/.splashy_shutdown
- fi
-fi
-
-# Paint progressbar..
-test -z "$progress_enable" && exit 0
-splashy_check
-update_progress