aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-01-22 19:34:10 +0000
committerOlivier Blin <oblin@mandriva.com>2007-01-22 19:34:10 +0000
commit8c82652cb6cc1255e3c977223331577848c3ffc7 (patch)
tree3a0212416ec4b6ed47672d95b32dc3e0254006a4
parent1de4e59606e88d291505505bbf0a25d54a2acae0 (diff)
downloadbootsplash-8c82652cb6cc1255e3c977223331577848c3ffc7.tar
bootsplash-8c82652cb6cc1255e3c977223331577848c3ffc7.tar.gz
bootsplash-8c82652cb6cc1255e3c977223331577848c3ffc7.tar.bz2
bootsplash-8c82652cb6cc1255e3c977223331577848c3ffc7.tar.xz
bootsplash-8c82652cb6cc1255e3c977223331577848c3ffc7.zip
add suspend support in splash.sh
-rw-r--r--scripts/splash.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/splash.sh b/scripts/splash.sh
index f1bf1a1..b65e84f 100644
--- a/scripts/splash.sh
+++ b/scripts/splash.sh
@@ -100,7 +100,7 @@ fi
num=$(( $nbservices + 2 ))
# Initialize and print text string..
-if [ "$progress" == 1 -o "$1" == "start" ]; then
+if [ "$progress" == 1 -o "$1" == "start" -o "$1" == "suspend" ]; then
# 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.
@@ -204,6 +204,11 @@ if [ "$progress" == 1 -o "$1" == "start" ]; then
[[ -f /etc/bootsplash/themes/$theme/config/bootsplash-$res.cfg ]] && /sbin/splash -s -u 0 /etc/bootsplash/themes/$theme/config/bootsplash-$res.cfg
echo "silent" >/proc/splash
chvt 1
+ elif [ "$1" == "suspend" ]; then
+ gprintf "Suspending the system..."
+ [[ -f /etc/bootsplash/themes/$theme/config/bootsplash-$res.cfg ]] && /sbin/splash -s -u 0 /etc/bootsplash/themes/$theme/config/bootsplash-$res.cfg
+ echo "silent" >/proc/splash
+ chvt 1
else
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
@@ -215,7 +220,7 @@ if [ "$progress" == 1 -o "$1" == "start" ]; then
fi
_boot=$TEXT
if [ "$text_x" != "" -a "$text_y" != "" \
- -a "$text_color" != "" -a "$text_size" != "" -a "$_silent" == "yes" -o "$_shutdown" == "yes" ]; then
+ -a "$text_color" != "" -a "$text_size" != "" -a "$_silent" == "yes" -o "$_shutdown" == "yes" -o "$1" == "suspend" ]; then
gprintf "Press Esc for verbose mode."
fbtruetype.static -x $text_x -y $text_y -t $text_color -s $text_size \
$custom_font "$_boot $TEXT"