Update soundtest
[grml-scripts.git] / usr_bin / zsh-login
1 #!/bin/sh
2 # Filename:      zsh-login
3 # Purpose:       customized zsh login welcome screen for use at grml
4 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports:   see http://grml.org/bugs/
6 # License:       This file is licensed under the GPL v2.
7 # Latest change: Fre Dez 21 22:12:06 CET 2007 [mika]
8 ################################################################################
9
10 . /etc/grml/sh-lib
11
12 [ -r /etc/grml_version ] && GRMLVERSION=$(cat /etc/grml_version) || GRMLVERSION='(no version information available)'
13
14 # allow customized release information
15 [ -r /etc/release_info ] && cat /etc/release_info
16
17 PATH=$HOME/bin:/bin:/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/games:/home/grml/bin
18
19 CMDLINE=$(cat /proc/cmdline)
20 case "$CMDLINE" in
21    # allow customized startup via bootoption startup:
22    *startup*)
23        script="$(getBootParam startup)"
24        if [ -x $(which $script) ] ; then
25           $script
26        fi
27        ;;
28    # turn on speakers for accessibility users:
29    *swspeak*|*blind*|*brltty*|*speakup*)
30       if [ -x /usr/bin/flite ] ; then
31          aumix -w 90 -v 90 -p 90 -m 90
32          flite -o play -t "Finished booting"
33       fi
34       ;;
35
36    # do nothing if booting with noquick:
37    noquick)
38       ;;
39    *) # by default run grml-quickconfig, but only if running as root
40       if [ $(id -u) = "0" ] ; then
41          # do not run grml-quickconfig on grml-small
42          if ! grep -q small /etc/grml_version ; then
43             [ -x /usr/sbin/grml-quickconfig ] && /usr/sbin/grml-quickconfig
44          fi
45       fi
46 esac
47
48 # display version information depending on the version:
49 if grep -q -- '-rc[0-9]' /etc/grml_version 2>/dev/null ; then
50    echo
51    echo
52    echo 'NOTICE: This is a release candidate of grml!'
53    echo 'Please notice that this is not yet a stable release.'
54    echo 'See http://wiki.grml.org/doku.php?id=release_candidate for known issues.'
55    echo 'Please report any bugs you notice: bugs@grml.org'
56    echo
57 fi
58
59 if grep -q 'grml-live-autobuild' /etc/grml_version 2>/dev/null ; then
60    echo
61    echo
62    echo 'NOTICE: This is a daily snapshot version of grml!'
63    echo 'Please notice that this is not yet a stable release.'
64    echo 'See http://daily.grml.org/ for more details.'
65    echo 'Please report any bugs you notice: daily@grml.org'
66    echo
67 fi
68
69 # just print out one single line if bootoption nowelcome is present,
70 # otherwise print usual welcome screen
71 if grep -q nowelcome /proc/cmdline 2>/dev/null ; then
72    echo
73 else
74    echo "
75
76 Welcome to ${GRMLVERSION}!
77
78 New to grml? Want to read some documentation?
79 Start via running 'grml-info'.
80 Get tips and hints via 'grml-tips \$KEYWORD'.
81 New to zsh? Run 'zsh-help'.
82
83 Switch to other consoles via alt-F<number> keys.
84
85 Happy hacking!               http://grml.org/
86 "
87 fi
88
89 exec /bin/zsh -l
90
91 ## END OF FILE #################################################################