Adding usr_bin/arename.pl and manpages/arename.pl.1
[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: Son Okt 28 15:44:09 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 # just print out one single line if bootoption nowelcome is present,
49 # otherwise print usual welcome screen
50 if grep nowelcome /proc/cmdline 2>/dev/null ; then
51    echo
52 else
53    echo "
54
55 Welcome to ${GRMLVERSION}!
56
57 New to grml? Want to read some documentation?
58 Start via running 'grml-info'.
59 Get tips and hints via 'grml-tips \$KEYWORD'.
60 New to zsh? Run 'zsh-help'.
61
62 Switch to other consoles via alt-F<number> keys.
63
64 Happy hacking!               http://grml.org/
65 "
66 fi
67
68 exec /bin/zsh -l
69
70 ## END OF FILE #################################################################