]> git.pld-linux.org Git - packages/console-tools.git/blobdiff - console.init
- updated gettext BR
[packages/console-tools.git] / console.init
index 10c7bd88680b1025a41085f2efcdf323b0fae65c..1ed11aa097bd480aa6d139272363f7773b567cc6 100644 (file)
@@ -1,11 +1,11 @@
-#!/bin/bash
+#!/bin/sh
 #
 # console      Load console font and keyboard table
 #
-# chkconfig: 345 70 30
+# chkconfig:   345 70 30
 #
-# description: Loads the console font, the application-charset map \
-#              and the keyboard table.
+# description: Loads the console font, the application-charset map \
+#              and the keyboard table.
 
 # This must be executed *after* /usr is mounted.
 # This means is /usr is NFS-mounted, it needs to
 . /etc/rc.d/init.d/functions
 
 case "$1" in
-       start|restart)
-               . /etc/sysconfig/console
+  start|restart|reload|force-reload)
+       . /etc/sysconfig/console
 
-               if [ "$SVGATEXTMODE" != "" ]
-               then
-                       SVGATextMode $SVGATEXTMODE
-               fi
-               if [ "$CONSOLEFONT" != "" ]
-               then
-                       show Loading console font
-                       busy
-                       consolechars -f $CONSOLEFONT &>/dev/null
-                       deltext;ok
-                       # Don't use "" here because additional options may be
-                       # specified after the font name (e.g. fallback tables)
-               fi
-               if [ "$CONSOLEMAP" != "" ]
-               then
-                       show Loading console map
-                       busy
-                       consolechars -m $CONSOLEMAP &>/dev/null
-                       deltext;ok
-               fi
-               if [ "$KEYTABLE" != "" ]
-               then
-                       show Loading keyboard table
-                       busy
-                       loadkeys $KEYTABLE &>/dev/null
-                       deltext;ok
-               fi
-               ;;
-       stop)
-               # Nothing to stop
-               ;;
-       status)
-               # Nothing to report
-               ;;
-       *)
-               echo "Usage: $0 {start|stop|status|restart}"
-               exit 1
+       if [ -n "$SVGATEXTMODE" ]; then
+               run_cmd "$(nls 'Setting Text Mode') $SVGATEXTMODE" SVGATextMode $SVGATEXTMODE
+       fi
+       if [ -n "$FBSET" ]; then
+               run_cmd "$(nls 'Setting Text Mode') $FBSET" fbset -a $FBSET
+       fi
+       if [ -n "$CONSOLEFONT" ]; then
+               run_cmd "Loading console font and map" consolechars -m ${CONSOLEMAP:-trivial.trans} -f $CONSOLEFONT
+               # Don't use "" here because additional options may be
+               # specified after the font name (e.g. fallback tables)
+       fi
+       if [ -n "$KEYTABLE" ]; then
+               run_cmd "Loading keyboard table" loadkeys $KEYTABLE < /dev/tty0 > /dev/tty0
+       fi
+       ;;
+  stop|status)
+       # Nothing to stop and/or report
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+       exit 3
 esac
 
 exit 0
This page took 0.079039 seconds and 4 git commands to generate.