summaryrefslogtreecommitdiffstats
path: root/abs/core/fbsplash/splash-functions-arch.sh
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
commit7b29169fff9e7c624890c5edffe85def8a293136 (patch)
tree47753889faa3a2063b66d1c7e7681e703eb1b39a /abs/core/fbsplash/splash-functions-arch.sh
parentc491dea779dac29afff3578bf8245943817c2339 (diff)
downloadlinhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.zip
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.gz
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.bz2
LinHES 6.01.00
Diffstat (limited to 'abs/core/fbsplash/splash-functions-arch.sh')
-rw-r--r--abs/core/fbsplash/splash-functions-arch.sh71
1 files changed, 71 insertions, 0 deletions
diff --git a/abs/core/fbsplash/splash-functions-arch.sh b/abs/core/fbsplash/splash-functions-arch.sh
new file mode 100644
index 0000000..977ccef
--- /dev/null
+++ b/abs/core/fbsplash/splash-functions-arch.sh
@@ -0,0 +1,71 @@
+# ArchLinux specific splash functions #
+# Author: Greg Helton <gt@fallendusk.org> #
+
+splash_init() {
+ splash_setup
+ splash_start
+}
+
+splash_exit() {
+ splash_comm_send "exit"
+ splash_cache_cleanup
+}
+
+splash_update_progress() {
+ local PROGRESS
+ PROGRESS=$(($1*65535/100))
+ splash_comm_send "progress ${PROGRESS}"
+ splash_comm_send "repaint"
+}
+
+var_save() {
+for i in $@ ;
+ do
+ local var
+ eval var=\$SPLASH_${i}
+ echo "SPLASH_$i=$(echo ${var})" > ${spl_cachedir}/${i}
+ done
+}
+
+var_load() {
+for i in $@ ;
+ do
+ local var
+ eval var=\$SPLASH_${i}
+ if [[ -z "$(echo ${var})" && -f ${spl_cachedir}/${i} ]] ; then
+ source ${spl_cachedir}/${i}
+ fi
+ done
+}
+
+save_boot_steps() {
+ var_load STEP_NR
+ echo $SPLASH_STEP_NR > /etc/conf.d/fbsplash.bootsteps
+}
+
+load_boot_steps() {
+ BOOT_STEPS=$(cat /etc/conf.d/fbsplash.bootsteps)
+ # Fail safe, so we don't divide by 0
+ if [ $BOOT_STEPS = 0 ]; then
+ BOOT_STEPS=1
+ fi
+ printf $BOOT_STEPS
+}
+
+save_shutdown_steps() {
+ var_load SHUTDOWN_STEPS
+ ((SPLASH_SHUTDOWN_STEPS++))
+ echo $SPLASH_SHUTDOWN_STEPS > /etc/conf.d/fbsplash.shutdownsteps
+ var_save SHUTDOWN_STEPS
+}
+
+load_shutdown_steps() {
+ SHUTDOWN_STEPS=$(cat /etc/conf.d/fbsplash.shutdownsteps)
+ # Fail safe, so we don't divide by 0
+ if [ $SHUTDOWN_STEPS = 0 ]; then
+ SHUTDOWN_STEPS=1
+ fi
+ printf $SHUTDOWN_STEPS
+}
+
+# EOF #