merged my vmware-detect devel branch with main
authorMichael Gebetsroither <michael.geb@gmx.at>
Wed, 28 Mar 2007 16:15:23 +0000 (18:15 +0200)
committerMichael Gebetsroither <michael.geb@gmx.at>
Wed, 28 Mar 2007 16:15:23 +0000 (18:15 +0200)
31 files changed:
.hgtags
compile/Makefile
debian/changelog
debian/control
debian/dirs
debian/rules
manpages/alignmargins.8 [new file with mode: 0644]
manpages/getsf.1
manpages/grml-iptstate.8
manpages/grml-quickconfig.8 [new file with mode: 0644]
manpages/grml-setkeyboard.8
manpages/grml-setlang.8
manpages/grml-setservices.8 [new file with mode: 0644]
manpages/gsuggest.1
manpages/gtf.1
manpages/iso-term.1 [new file with mode: 0644]
manpages/random-hostname.1
usr_bin/grml-init-screen
usr_bin/grml-lock
usr_bin/grml-mutt
usr_bin/grml-muttng
usr_bin/grml-screen
usr_bin/grml-slrn
usr_bin/iso-term [new file with mode: 0755]
usr_bin/zsh-login
usr_sbin/alignmargins [new file with mode: 0755]
usr_sbin/dirvish-setup
usr_sbin/grml-quickconfig [new file with mode: 0755]
usr_sbin/grml-setlang
usr_sbin/grml-setservices [new file with mode: 0755]
usr_share/align.ps [new file with mode: 0644]

diff --git a/.hgtags b/.hgtags
index 976c89b..0bc1685 100644 (file)
--- a/.hgtags
+++ b/.hgtags
@@ -22,3 +22,13 @@ ca945168479677cc9f411614c3c58e6af497be98 0.9.18
 3c8b34b4a4cb04babddbc52e8c7e22a342c25e79 0.9.19
 b70a68a026d28c3549ee1e6a5c94b824c4b4815d 0.9.20
 3da3b0239240d8caf4f6aef3a7e905b69f0fdee5 0.9.21
+f4e26d271d81600cc632cbdfd68647ae9e0f1055 0.9.22
+c66f30aeb9d5e3c8c5cb92efe4d968b82703dc75 0.9.23
+260da60766f952f5589be5c9e56a1ad18da72762 0.9.24
+2822386e1457ca85b2ef1f6b8989bed2658c4814 0.9.25
+38d338a8052bb2694b955d8d5675dc92bee42596 0.9.26
+ee1684e91dae65df835e74a638dee617b0bc5688 0.9.28
+f55e1ef450a80fe3b9043f7e01f0baeafd45f475 0.9.29
+38cb722a8171f5e129549f7ee89d7186afc75fb4 0.9.31
+8e4462dffb31dcea11282cf23ef197a171322d92 0.9.32
+05c9eb8a7f945389d9bf6a13574765951914a84d 0.9.33
index bb84258..dd2bbce 100644 (file)
@@ -29,6 +29,7 @@ dpkg_not_running: dpkg_not_running.c
        diet $(CC) $(CFLAGS) -o $@ $^
 
 align: align.c
+       $(CC) -Wall -o align align.c
 
 reread_partition_table: reread_partition_table.c
        diet $(CC) $(CFLAGS) -o $@ $^
index ccae1a8..c2ad7be 100644 (file)
@@ -1,3 +1,97 @@
+grml-scripts (0.9.34) unstable; urgency=low
+
+  * Makefile fixes for align.c, -O2 produces wrong results. 
+
+ -- Michael Gebetsroither <gebi@grml.org>  Wed, 28 Mar 2007 14:02:26 +0200
+
+grml-scripts (0.9.33) unstable; urgency=low
+
+  * grml*screen-scripts: use vt-is-UTF8 with quiet option, otherwise
+    detection of non-UTF8 terminals fails for us. Thanks for the
+    bug report, Gebi!
+
+ -- Michael Prokop <mika@grml.org>  Wed, 21 Mar 2007 15:39:10 +0100
+
+grml-scripts (0.9.32) unstable; urgency=low
+
+  * Added alignmargins (adjust the margins and the position of the printed
+    contents on the paper). Thanks for suggestion, Moritz Augsburger!
+    [Closes: issue146]
+
+ -- Michael Prokop <mika@grml.org>  Sun, 18 Mar 2007 19:34:12 +0100
+
+grml-scripts (0.9.31) unstable; urgency=low
+
+  * Added xlockmore to suggests, added check for vlock in grml-lock.
+  * Check for mutt/muttng binaries in grml-mutt[ng]. Removed deprecated
+    URL in grml-muttng.
+  * Added check4progs to grml-slrn.
+
+ -- Michael Prokop <mika@grml.org>  Sun, 18 Mar 2007 16:44:53 +0100
+
+grml-scripts (0.9.30) unstable; urgency=low
+
+  * Added idesk to Suggests.
+
+ -- Michael Prokop <mika@grml.org>  Sun, 18 Mar 2007 15:43:54 +0100
+
+grml-scripts (0.9.29) unstable; urgency=low
+
+  * Really depend on sudo. :)
+
+ -- Michael Prokop <mika@grml.org>  Sun, 18 Mar 2007 00:28:35 +0100
+
+grml-scripts (0.9.28) unstable; urgency=low
+
+  * Add less to depends.
+
+ -- Michael Prokop <mika@grml.org>  Sun, 18 Mar 2007 00:02:26 +0100
+
+grml-scripts (0.9.27) unstable; urgency=low
+
+  * Depend on sudo, we definitely need it.
+
+ -- Michael Prokop <mika@grml.org>  Sat, 17 Mar 2007 23:47:11 +0100
+
+grml-scripts (0.9.26) unstable; urgency=low
+
+  * Added iso-term (wrapper script to run x-terminal-emulator in iso885915
+    mode).
+
+ -- Michael Prokop <mika@grml.org>  Sat, 17 Mar 2007 19:59:09 +0100
+
+grml-scripts (0.9.25) unstable; urgency=low
+
+  * zsh-login: do not run grml-quickconfig when booting with 'nocolor'
+
+ -- Michael Prokop <mika@grml.org>  Sat, 17 Mar 2007 15:17:10 +0100
+
+grml-scripts (0.9.24) unstable; urgency=low
+
+  * grml-setlang: do not set $TZ anymore, we want to handle it
+    via /etc/timezone.
+  * Integrate grml-quickconfig within zsh-login. grml-quickconfig
+    has been contributed by Michael Schierl - thanks!
+    [Closes: issue97]
+
+ -- Michael Prokop <mika@grml.org>  Fri, 16 Mar 2007 22:49:34 +0100
+
+grml-scripts (0.9.23) unstable; urgency=low
+
+  * Added grml-setservices (interface for basic configuration of system
+    startup/shutdown via /etc/runlevel.conf) [Closes: issue89]
+  * Removed todo note from manpage of grml-setkeyboard.
+
+ -- Michael Prokop <mika@grml.org>  Fri, 16 Mar 2007 21:54:31 +0100
+
+grml-scripts (0.9.22) unstable; urgency=low
+
+  * dirvish-setup: support setting of tree (directory) that should
+    be included in the backup, do not move master.conf but create
+    it only if it does not exist yet.
+
+ -- Michael Prokop <mika@grml.org>  Fri,  9 Mar 2007 19:46:11 +0100
+
 grml-scripts (0.9.21) unstable; urgency=low
 
   * Fix for myip, thanks to wuehlmaus and schula.
index 04d1964..410ea70 100644 (file)
@@ -8,8 +8,8 @@ XS-X-Vcs-Hg: http://hg.grml.org/grml-scripts
 
 Package: grml-scripts
 Architecture: any
-Depends: dialog, perl, zsh, dash, w3m | links | links2, screen, console-tools | xbase-clients, grml-network, grml-etc-core
-Suggests: ruby, python, grml-x, ipcalc, hwinfo, antiword, grml-etc, grml-rebuildfstab, grml-scanpartitions, grml-files, grml-hwinfo, grml-saveconfig, pptp-linux, flite, wmii, mutt | mutt-ng, slrn, grml-docs, grml-autoconfig (>= 0.6.9), lzop, dirvish
+Depends: less, dialog, perl, zsh, dash, w3m | links | links2, screen, console-tools | xbase-clients, grml-network, grml-etc-core
+Suggests: ruby, python, grml-x, ipcalc, hwinfo, antiword, grml-etc, grml-rebuildfstab, grml-scanpartitions, grml-files, grml-hwinfo, grml-saveconfig, pptp-linux, flite, wmii, mutt | mutt-ng, slrn, grml-docs, grml-autoconfig (>= 0.6.9), lzop, dirvish, sudo, idesk, xlockmore
 Conflicts: scanmodem, grml-etc-core (<< 0.1-30)
 Description: some small scripts which should make life easier
  Some scripts which should make life easier. For example:
index d53d4bb..1063344 100644 (file)
@@ -4,3 +4,4 @@ etc/postfix
 usr/bin
 usr/sbin
 sbin
+usr/share/grml-scripts
index 9a496a3..badd419 100755 (executable)
@@ -33,6 +33,7 @@ install: build
        # Add here commands to install the package into debian/grml-scripts.
        cp usr_bin/*         debian/grml-scripts/usr/bin/
        cp usr_sbin/*        debian/grml-scripts/usr/sbin/
+       cp usr_share/*       debian/grml-scripts/usr/share/grml-scripts/
        cp makefile.postfix  debian/grml-scripts/etc/postfix/Makefile
        install -m 755 compile/align                  debian/grml-scripts/usr/bin/align
        install -m 755 compile/cpu-screen             debian/grml-scripts/usr/bin/cpu-screen
@@ -55,7 +56,8 @@ binary-arch: build install
        dh_installdocs
        dh_installman manpages/grml-scripts.1 manpages/reread_partition_table.8 manpages/gtf.1 manpages/random-hostname.1 \
        manpages/grml-setkeyboard.8 manpages/grml-setlang.8 manpages/getsf.1 manpages/grml-iptstate.8 manpages/qma.1 manpages/grml-swapon.8 \
-       manpages/grml2ram.8 manpages/gsuggest.1 manpages/dirvish-setup.8
+       manpages/grml2ram.8 manpages/gsuggest.1 manpages/dirvish-setup.8 manpages/grml-setservices.8 manpages/grml-quickconfig.8 \
+       manpages/iso-term.1 manpages/alignmargins.8
 #      cp --no-dereference man/*.1.gz debian/grml-scripts/usr/share/man/man1/
        dh_link /usr/sbin/blacklist /usr/sbin/unblacklist \
                /usr/share/man/man1/grml-scripts.1.gz /usr/share/man/man1/align.1.gz \
diff --git a/manpages/alignmargins.8 b/manpages/alignmargins.8
new file mode 100644 (file)
index 0000000..92515d8
--- /dev/null
@@ -0,0 +1,27 @@
+.TH alignmargins 8
+.SH "NAME"
+alignmargins \- adjust the margins and the position of the printed contents on the paper
+.SH SYNOPSIS
+.B alignmargins [/path/to/align.ps]
+.SH DESCRIPTION
+This manual page documents briefly the
+.B alignmargins
+command.
+.SH OPTIONS
+alignmargins does not support any options.
+.SH PURPOSE OF alignmargins
+With this program you can adjust the margins and the position of the
+printed contents on the paper. This way you get well-centered printouts and
+you can make use of the whole imageable area of your printer, The driver
+settings are overridden when this adjustment is used.
+
+This is especially important when your printer is used with a driver for
+another printer to which yours is compatible (for example many laser
+printers are compatible to the HP LaserJet printers). Your printer prints
+with this driver, but the non-printable margins are usually different or the
+contents is even not centered. With this program you can fix these problems
+.SH AUTHOR
+alignmargins was written by Till Kamppeter.
+.PP
+This manual page was written by Michael Prokop
+<mika@grml.org> for the grml project (but may be used by others).
index ca9fb5f..7961f91 100644 (file)
@@ -25,4 +25,4 @@ Download htop version 0.6.3 from mirror puzzle.
 getsf was written by Michael Prokop <mika@grml.org>.
 .PP
 This manual page was written by Michael Prokop
-<mika@grml.org> for the Debian project (but may be used by others).
+<mika@grml.org> for the grml project (but may be used by others).
index 203fa34..013b597 100644 (file)
@@ -21,4 +21,4 @@ to load it (just answer with yes or no, by default yes will be assumed).
 grml-iptstate was written by Michael Prokop <mika@grml.org>.
 .PP
 This manual page was written by Michael Prokop
-<mika@grml.org> for the Debian project (but may be used by others).
+<mika@grml.org> for the grml project (but may be used by others).
diff --git a/manpages/grml-quickconfig.8 b/manpages/grml-quickconfig.8
new file mode 100644 (file)
index 0000000..0c38126
--- /dev/null
@@ -0,0 +1,24 @@
+.TH grml-quickconfig 8
+.SH "NAME"
+grml-quickconfig \- get fast access to some basic grml-scripts
+.SH SYNOPSIS
+.B grml-quickconfig
+.SH DESCRIPTION
+This manual page documents briefly the
+.B grml-quickconfig
+command.
+.SH OPTIONS
+grml-quickconfig does not support any options.
+.SH NOTES
+grml-quickconfig provides a console based interface to get fast
+access to some basic grml-scripts like for example grml-network,
+netcardconfig, grml-lang, grml-x and grml2hd.
+.SH USAGE EXAMPLES
+.TP
+.B grml-quickconfig
+Invoke the interface.
+.SH AUTHOR
+grml-quickconfig was written by Michael Schierl <schierlm-public@gmx.de>.
+.PP
+This manual page was written by Michael Prokop
+<mika@grml.org> for the grml project (but may be used by others).
index 43e729d..9fea2b1 100644 (file)
@@ -15,11 +15,11 @@ Use loadkeys on the console and setxkbmap on X to modify keyboard layout manuall
 .SH USAGE EXAMPLES
 .TP
 .B grml-setkeyboard
-TODO
+Invoke the interface.
 .SH SEE ALSO
 .BR grml-setlang (8).
 .SH AUTHOR
 grml-setkeyboard was written by Michael Prokop <mika@grml.org>.
 .PP
 This manual page was written by Michael Prokop
-<mika@grml.org> for the Debian project (but may be used by others).
+<mika@grml.org> for the grml project (but may be used by others).
index 71433d4..ecddc8b 100644 (file)
@@ -28,4 +28,4 @@ Write austrian environment variables LANGUAGE, LANG, LC_MESSAGES, COUNTRY, CHARS
 grml-setlang was written by Michael Prokop <mika@grml.org>.
 .PP
 This manual page was written by Michael Prokop
-<mika@grml.org> for the Debian project (but may be used by others).
+<mika@grml.org> for the grml project (but may be used by others).
diff --git a/manpages/grml-setservices.8 b/manpages/grml-setservices.8
new file mode 100644 (file)
index 0000000..61f41d4
--- /dev/null
@@ -0,0 +1,30 @@
+.TH grml-setservices 8
+.SH "NAME"
+grml-setservices \- interface for basic configuration of system startup
+.SH SYNOPSIS
+.B grml-setservices
+.SH DESCRIPTION
+This manual page documents briefly the
+.B grml-setservices
+command.
+.SH OPTIONS
+grml-setservices does not support any options.
+.SH NOTES
+grml-setservices is a simple script for configuring some core
+settings of system startup. The script uses the interface update-rc.d
+for adjusting the file /etc/runlevel.conf. /etc/runlevel.conf is the
+configuration file for startup (and shutdown) used by file-rc (which
+is the default init system on grml). You neither have to use grml-setservices
+nor update-rc.d to edit /etc/runlevel.conf, you can edit it manually
+(using your favourite editor) as well of course.
+.SH USAGE EXAMPLES
+.TP
+.B grml-setservices
+Invoke the interface.
+.SH SEE ALSO
+.BR runlevel.conf (5).
+.SH AUTHOR
+grml-setservices was written by Michael Prokop <mika@grml.org>.
+.PP
+This manual page was written by Michael Prokop
+<mika@grml.org> for the grml project (but may be used by others).
index 7bbaf80..b0e8679 100644 (file)
@@ -22,4 +22,4 @@ gsuggest.pl does not support any options.
 gsuggest.pl was written by Michael Prokop <mika@grml.org>.
 .PP
 This manual page was written by Michael Prokop <mika@grml.org>
-for the Debian project (but may be used by others).
+for the grml project (but may be used by others).
index 6a4da0e..6b54a0e 100644 (file)
@@ -31,4 +31,4 @@ gtf was written by Andy Ritger <aritger@nvidia.com>.
 Taken from http://osdn.dl.sourceforge.net/sourceforge/gtf/gtf.c
 .PP
 This manual page was written by #USERNAME# <#EMAIL#>,
-for the Debian project (but may be used by others).
+for the grml project (but may be used by others).
diff --git a/manpages/iso-term.1 b/manpages/iso-term.1
new file mode 100644 (file)
index 0000000..e807d88
--- /dev/null
@@ -0,0 +1,24 @@
+.TH iso-term 1
+.SH "NAME"
+iso-term \- wrapper script to run x-terminal-emulator in iso885915 mode
+.SH SYNOPSIS
+.B iso-term
+.SH DESCRIPTION
+This manual page documents briefly the
+.B iso-term
+command.
+.SH OPTIONS
+iso-term does not support any options.
+.SH NOTES
+iso-term is a simple wrapper script to run x-terminal-emulator in iso885915 mode.
+This might be useful when you have to connect to a remote system which is running
+in iso885915 mode even though your local system uses utf-8.
+.SH USAGE EXAMPLES
+.TP
+.B iso-term
+Run x-terminal-emulator in iso mode.
+.SH AUTHOR
+iso-term was written by Michael Prokop <mika@grml.org>.
+.PP
+This manual page was written by Michael Prokop
+<mika@grml.org> for the grml project (but may be used by others).
index 1cf7b19..e5b727b 100644 (file)
@@ -17,4 +17,4 @@ Print a random hostname to stdout.
 random-hostname was written by Michael Prokop <mika@grml.org>.
 .PP
 This manual page was written by Michael Prokop
-<mika@grml.org> for the Debian project (but may be used by others).
+<mika@grml.org> for the grml project (but may be used by others).
index 8a08114..db22b67 100755 (executable)
@@ -4,7 +4,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Sam Feb 17 12:14:46 CET 2007 [mika]
+# Latest change: Mit Mär 21 15:39:07 CET 2007 [mika]
 ################################################################################
 
 # export variable USER for use withing GNU screen:
@@ -18,7 +18,7 @@
 # now start screen:
   cd $HOME
   # do we have a utf8 enabled terminal?
-  [ -x /usr/bin/vt-is-UTF8 ] && /usr/bin/vt-is-UTF8 && UTF='-U'
+  [ -x /usr/bin/vt-is-UTF8 ] && /usr/bin/vt-is-UTF8 -q && UTF='-U'
   /usr/bin/screen $UTF -c /etc/grml/screenrc ; exec /bin/zsh
 
 ## END OF FILE #################################################################
index 2d75050..e6e50e1 100755 (executable)
@@ -4,11 +4,16 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Sam Mai 27 15:12:24 CEST 2006 [mika]
+# Latest change: Son Mär 18 16:41:49 CET 2007 [mika]
 ################################################################################
 
 PN=$0
 
+if [ -r /etc/grml/script-functions ] ; then
+   . /etc/grml/script-functions
+   check4progs vlock xlock sudo chpasswd dialog || { echo "Sorry, can't continue. Exiting.">&2 ; exit 1 }
+fi
+
 if [ -r /etc/grml_version ] ; then
 else
   dialog --stdout --title "$PN" --msgbox "Warning: this system does not look like a grml-system
index 589573e..c09a1f9 100755 (executable)
@@ -4,11 +4,16 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Son Apr 24 16:55:51 CEST 2005 [mika]
+# Latest change: Son Mär 18 17:15:41 CET 2007 [mika]
 ################################################################################
 
 PATH=${PATH:-'/bin/:/sbin/:/usr/local/bin:/usr/bin:/usr/sbin'}
-PN=`basename "$0"`
+PN=$(basename "$0")
+
+if [ -r /etc/grml/script-functions ] ; then
+   . /etc/grml/script-functions
+   check4progs dialog mutt || echo "Warning - mutt is not available. Continuing anyway.">&2
+fi
 
 writemuttrc() {
 cat > $MUTTRC << EOF
@@ -382,17 +387,15 @@ case $retval in
         0) 
           writemuttrc && writecolors && \
           dialog --stdout --title "$PN" --msgbox "Writing $MUTTRC was successful." 7 65 || \
-          dialog --stdout --title "$PN" --msgbox "Error $?: writing $MUTTRC failed." 7 65
+          { dialog --stdout --title "$PN" --msgbox "Error $?: writing $MUTTRC failed." 7 65 ; exit 1 ; }
           ;;
-#        *) exit 1 ;;
       esac
     else
        writemuttrc && writecolors && \
        dialog --stdout --title "$PN" --msgbox "Writing $MUTTRC was successfull." 7 65 || \
-       dialog --stdout --title "$PN" --msgbox "Error $?: writing $MUTTRC failed." 7 65
+       { dialog --stdout --title "$PN" --msgbox "Error $?: writing $MUTTRC failed." 7 65 ; exit 1 ; }
     fi
     ;;
-#  *) exit 1 ;;
 esac
 
 dialog --stdout --title "$PN" --msgbox "Thanks for using $PN!
index 55cc240..776c4c9 100755 (executable)
@@ -4,11 +4,16 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Don Sep 21 20:00:07 CEST 2006 [mika]
+# Latest change: Son Mär 18 17:15:16 CET 2007 [mika]
 ################################################################################
 
 PATH=${PATH:-'/bin/:/sbin/:/usr/local/bin:/usr/bin:/usr/sbin'}
-PN=`basename "$0"`
+PN=$(basename "$0")
+
+if [ -r /etc/grml/script-functions ] ; then
+   . /etc/grml/script-functions
+   check4progs dialog muttng || echo "Warning - muttng is not available. Continuing anyway.">&2
+fi
 
 writemuttngrc() {
 cat > $MUTTRC << EOF
@@ -410,13 +415,13 @@ case $retval in
         0) 
           writemuttngrc && writecolors && \
           dialog --stdout --title "$PN" --msgbox "Writing $MUTTRC was successful." 7 65 || \
-          dialog --stdout --title "$PN" --msgbox "Error $?: writing $MUTTRC failed." 7 65
+          { dialog --stdout --title "$PN" --msgbox "Error $?: writing $MUTTRC failed." 7 65 ; exit 1 ; }
           ;;
       esac
     else
        writemuttngrc && writecolors && \
        dialog --stdout --title "$PN" --msgbox "Writing $MUTTRC was successfull." 7 65 || \
-       dialog --stdout --title "$PN" --msgbox "Error $?: writing $MUTTRC failed." 7 65
+       { dialog --stdout --title "$PN" --msgbox "Error $?: writing $MUTTRC failed." 7 65 ; exit 1 ; }
     fi
     ;;
 esac
@@ -431,7 +436,6 @@ Manuals: man 1 muttng
 Webpages:
 http://mutt-ng.berlios.de/
 http://mutt-ng.supersized.org/
-http://www.strcat.de/muttng/pmwiki.php
 
 #######################################################
 
index 500e89b..cd40503 100755 (executable)
@@ -4,7 +4,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Sam Feb 17 12:15:05 CET 2007 [mika]
+# Latest change: Mit Mär 21 15:39:00 CET 2007 [mika]
 ################################################################################
 
 # export variable USER for use withing GNU screen:
@@ -18,7 +18,7 @@
 # now run screen with config
   cd $HOME     # important for e.g. hardcopy-feature
   # do we have a utf8 enabled terminal?
-  [ -x /usr/bin/vt-is-UTF8 ] && /usr/bin/vt-is-UTF8 && UTF='-U'
+  [ -x /usr/bin/vt-is-UTF8 ] && /usr/bin/vt-is-UTF8 -q && UTF='-U'
   if [ `id -u` = 0 ] ; then
     exec screen $UTF -c /etc/grml/screenrc
   elif [ -r "$HOME/.screenrc" ] ; then
index 8dea352..29693ba 100755 (executable)
@@ -4,7 +4,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Mon Dez 18 00:31:53 CET 2006 [mika]
+# Latest change: Son Mär 18 17:23:34 CET 2007 [mika]
 ################################################################################
 
 PATH=${PATH:-'/bin/:/sbin/:/usr/local/bin:/usr/bin:/usr/sbin'}
@@ -12,6 +12,11 @@ PN=$(basename "$0")
 USER=$(grep \`whoami\` /etc/passwd | cut -d: -f5 | cut -d, -f1)
 HOST=$(hostname -f)
 
+if [ -r /etc/grml/script-functions ] ; then
+   . /etc/grml/script-functions
+   check4progs dialog slrn || { echo "Sorry, can't continue. Exiting.">&2 ; exit 1 ; }
+fi
+
 [ -z "$EDITOR" ] && EDITOR='vim'
 [ -z "$NNTPSERVER" ] && NNTPSERVER="news.`hostname`"
 
@@ -316,17 +321,15 @@ case $retval in
         0) 
           writeslrnrc && writecolors && \
           dialog --stdout --title "$PN" --msgbox "Writing $SLRNRC was successful." 7 65 || \
-          dialog --stdout --title "$PN" --msgbox "Error $?: writing $SLRNRC failed." 7 65
+         { dialog --stdout --title "$PN" --msgbox "Error $?: writing $SLRNRC failed." 7 65 ; exit 1 ; }
           ;;
-#        *) exit 1 ;;
       esac
     else
        writeslrnrc && writecolors && \
        dialog --stdout --title "$PN" --msgbox "Writing $SLRNRC was successfull." 7 65 || \
-       dialog --stdout --title "$PN" --msgbox "Error $?: writing $SLRNRC failed." 7 65
+       { dialog --stdout --title "$PN" --msgbox "Error $?: writing $SLRNRC failed." 7 65 ; exit 1 ; }
     fi
     ;;
-#  *) exit 1 ;;
 esac
 
 infoscreen
@@ -337,9 +340,9 @@ retval=$?
 case $retval in
   0) 
      slrn -create -h $NEWSSERVER -f $HOME/.newsrc_$NEWSSERVER -i $SLRNRC && \
-     echo ""
-     echo "Start slrn with taken settings via:
-$ slrn -h $NEWSSERVER -f $HOME/.newsrc_$NEWSSERVER -i $SLRNRC
+     echo "
+Start slrn with taken settings via:
+% slrn -h $NEWSSERVER -f $HOME/.newsrc_$NEWSSERVER -i $SLRNRC
 
 Thanks for using $PN and have fun with slrn!"
      ;;
diff --git a/usr_bin/iso-term b/usr_bin/iso-term
new file mode 100755 (executable)
index 0000000..9a81976
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/sh
+# Filename:      iso-term
+# Purpose:       wrapper script to run x-terminal-emulator in iso885915 mode
+# Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
+# Bug-Reports:   see http://grml.org/bugs/
+# License:       This file is licensed under the GPL v2.
+# Latest change: Sam Mär 17 19:56:13 CET 2007 [mika]
+################################################################################
+
+isutfenv() {
+case "$LANG $CHARSET $LANGUAGE" in
+        (*utf*) return 0 ;;
+        (*UTF*) return 0 ;;
+        (*) return 1 ;;
+esac
+}
+
+if isutfenv ; then
+   for ENV in `env | grep UTF` ; do
+       eval export "$(echo $ENV | sed 's/UTF-8/iso885915/')"
+   done
+   x-terminal-emulator
+else
+   x-terminal-emulator
+fi
+
+## END OF FILE #################################################################
index 646ab3c..382cdb4 100755 (executable)
@@ -4,7 +4,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Sam Feb 17 13:58:14 CET 2007 [mika]
+# Latest change: Sam Mär 17 15:16:04 CET 2007 [mika]
 ################################################################################
 
 [ -r /etc/grml_version ] && GRMLVERSION=$(cat /etc/grml_version) || GRMLVERSION='(no version information available)'
@@ -25,12 +25,22 @@ Happy hacking!               http://grml.org/
 
 [ -r /etc/release_info ] && cat /etc/release_info
 
-if [ -x /usr/bin/flite ] ; then
- CMDLINE=$(cat /proc/cmdline)
- case "$CMDLINE" in
-   *swspeak*|*blind*|*brltty*|*speakup*) flite -o play -t "Finished booting" ;;
- esac
-fi
+CMDLINE=$(cat /proc/cmdline)
+case "$CMDLINE" in
+   *swspeak*|*blind*|*brltty*|*speakup*)
+      if [ -x /usr/bin/flite ] ; then
+         aumix -w 90 -v 90 -p 90 -m 90
+         flite -o play -t "Finished booting"
+      fi
+      ;;
+   noquick|nocolor)
+      # do nothing
+      ;;
+   *) # by default run grml-quickconfig, but only if running as root
+      if [ $(id -u) = "0" ] ; then
+         [ -x /usr/sbin/grml-quickconfig ] && /usr/sbin/grml-quickconfig
+      fi
+esac
 
 exec /bin/zsh -l
 
diff --git a/usr_sbin/alignmargins b/usr_sbin/alignmargins
new file mode 100755 (executable)
index 0000000..3dcccb2
--- /dev/null
@@ -0,0 +1,275 @@
+#! /usr/bin/perl
+# Filename:      alignmargins
+# Purpose:       adjust the margins and the position of the printed contents on the paper
+# Authors:       (C) 2001 by Till Kamppeter
+# Bug-Reports:   see http://grml.org/bugs/
+# License:       Free software under the terms of the GNU General Public License (GPL)
+# Latest change: Son Mär 18 19:31:15 CET 2007 [mika]
+################################################################################
+# Downloaded from http://www.linuxprinting.org/download/printing/alignmargins
+
+$0 =~ m!^(.*)/[^/]+$!;
+my $programpath = $1;
+my $printcommand = '/usr/bin/lpr -P ';
+my $egrep = '/bin/egrep';
+my $cat = '/bin/cat';
+my $cut = '/usr/bin/cut';
+my $head = '/usr/bin/head';
+my $tail = '/usr/bin/tail';
+my $wc = '/usr/bin/wc';
+my $adjustmentpagename = 'align.ps';
+my $adjustmentpagepath = ($programpath ? "${programpath}:" : "") . '.:~:/usr/share/grml-scripts:/usr/share/alignmargins:/usr/local/share/alignmargins:/usr/share:/usr/local/share:/usr/share/printer-testpages:/usr/local/share/printer-testpages:/usr/share/ghostscript/*/lib:/usr/local/share/ghostscript/*/lib';
+my $ppddir = '/etc/cups/ppd';
+my $printerconffile = '/etc/cups/printers.conf';
+
+# Find "ælign.ps"
+
+my $adjustmentpage;
+for $path (split(":", $adjustmentpagepath)) {
+    if (-r "$path/$adjustmentpagename") {
+       $adjustmentpage = "$path/$adjustmentpagename";
+       last;
+    }
+}
+
+# Are we running as root?
+
+if (!(-w $printerconffile)) {die "\"alignmargins\" must be run logged in as \"root\"!";}
+
+# Check whether there are local printer queues 
+
+open NUMBEROFQUEUES, "$cat $printerconffile | $egrep '<Printer|<DefaultPrinter' | $wc -l |" or die "Cannot read local printer configuration!";
+my $nqueues = <NUMBEROFQUEUES>;
+close NUMBEROFQUEUES;
+
+# Ask the user which printer he wants to align
+
+print "\n";
+print "CUPS printer margin and offset alignment\n";
+print "----------------------------------------\n";
+print "\n";
+print "(C) 2001 by Till Kamppeter\n";
+print "Free software under the terms of the GNU General Public License (GPL)\n";
+my $queue = "";
+
+do {
+  print "\n";
+  print "With this program you can adjust the margins and the position of the\n";
+  print "printed contents on the paper. This way you get well-centered printouts and\n";
+  print "you can make use of the whole imageable area of your printer, The driver\n";
+  print "settings are overridden when this adjustment is used.\n";
+  print "\n";
+  print "This is especially important when your printer is used with a driver for\n";
+  print "another printer to which yours is compatible (for example many laser\n";
+  print "printers are compatible to the HP LaserJet printers). Your printer prints\n";
+  print "with this driver, but the non-printable margins are usually different or the\n";
+  print "contents is even not centered. With this program you can fix these problems\n";
+  print "\n";
+  print "The program can only be applied to local printer queues. The following\n";
+  print "queues are available:\n";
+  print "\n";
+
+  system "$cat $printerconffile | $egrep '<Printer|<DefaultPrinter' | $cut -d ' ' -f 2 | $cut -d '>' -f 1 | $cat -n";
+
+  print "\n";
+  print "Please enter the number of the desired printer and make sure that it is\n";
+  print "connected to your computer and turned on.\n";
+  print "\n";
+
+  print "Number: ";
+  my $input = <STDIN>;
+
+  if ( $input =~ m/^\s*(\d+)\D*/ ) {
+    my $number = $1;
+    if (($number > 0) && ($number <= $nqueues)) {
+      open QUEUE, "$cat $printerconffile | $egrep '<Printer|<DefaultPrinter' | $cut -d ' ' -f 2 | $cut -d '>' -f 1| $head -$number | $tail -1 |";
+      if (!$?) {
+        $queue = <QUEUE>; 
+        close QUEUE;
+      }
+    }
+  } else {
+    print "\nWrong input, try again!\n";
+  }
+} until ($queue ne "");
+
+chomp $queue;
+
+print "\n";
+print "Printing margin/offset adjustment page ...\n";
+print "\n";
+
+# The "%!" which is needed in a file to be recognized as a PostScript file
+# is missing in the adjustment page, therefore it is preceeded to the file
+# here.
+if (system "(echo %!; $cat $adjustmentpage) | $printcommand$queue") {
+die "Could not print the adjustment page.";
+}
+
+print "Please read the instructions on the margin adjustment page and determine the\n";
+print "six numbers mentioned there. If you measure in cm and not in inches, devide\n";
+print "the measured quantities by 2.54 before you insert them into the equations\n";
+print "shown on the page. You do not need to create any file with PostScript\n";
+print "commands, this program will insert your settings into your printer's\n";
+print "configuration.\n";
+print "\n";
+print "If the adjustment page did not come out of your printer, this method cannot\n";
+print "be applied, press Ctrl + C to stop this program. This can especially happen\n";
+print "with very old PostScript printers.\n";
+print "\n";
+print "Note also that this adjustment does not necessarily work with every driver.\n";
+print "The concept is taken from GhostScript and the implementation of this program\n";
+print "is not much tested yet.\n";
+print "\n";
+
+print "Please enter your results now:\n";
+print "\n";
+
+my $ml = 9999999.;
+my $mb = 9999999.;
+my $mr = 9999999.;
+my $mt = 9999999.;
+my $x = 9999999.;
+my $y = 9999999.;
+
+do {
+  print "ml: ";
+  my $input = <STDIN>;
+
+  if ( $input =~ m/^\s*([+-]?[\d\.]+)\D*/ ) {
+    my $number = $1;
+    if (($number >= -100000) && ($number <= 100000)) {
+      $ml = $number * 1.;
+    }
+  } else {
+    print "Wrong input, try again!\n";
+  }
+} until ($ml != 9999999.);
+
+do {
+  print "mb: ";
+  my $input = <STDIN>;
+
+  if ( $input =~ m/^\s*([+-]?[\d\.]+)\D*/ ) {
+    my $number = $1;
+    if (($number >= -100000) && ($number <= 100000)) {
+      $mb = $number * 1.;
+    }
+  } else {
+    print "Wrong input, try again!\n";
+  }
+} until ($mb != 9999999.);
+
+do {
+  print "mr: ";
+  my $input = <STDIN>;
+
+  if ( $input =~ m/^\s*([+-]?[\d\.]+)\D*/ ) {
+    my $number = $1;
+    if (($number >= -100000) && ($number <= 100000)) {
+      $mr = $number * 1.;
+    }
+  } else {
+    print "Wrong input, try again!\n";
+  }
+} until ($mr != 9999999.);
+
+do {
+  print "mt: ";
+  my $input = <STDIN>;
+
+  if ( $input =~ m/^\s*([+-]?[\d\.]+)\D*/ ) {
+    my $number = $1;
+    if (($number >= -100000) && ($number <= 100000)) {
+      $mt = $number * 1.;
+    }
+  } else {
+    print "Wrong input, try again!\n";
+  }
+} until ($mt != 9999999.);
+
+do {
+  print "x: ";
+  my $input = <STDIN>;
+
+  if ( $input =~ m/^\s*([+-]?[\d\.]+)\D*/ ) {
+    my $number = $1;
+    if (($number >= -100000) && ($number <= 100000)) {
+      $x = $number * 1.;
+    }
+  } else {
+    print "Wrong input, try again!\n";
+  }
+} until ($x != 9999999.);
+
+do {
+  print "y: ";
+  my $input = <STDIN>;
+
+  if ( $input =~ m/^\s*([+-]?[\d\.]+)\D*/ ) {
+    my $number = $1;
+    if (($number >= -100000) && ($number <= 100000)) {
+      $y = $number * 1.;
+    }
+  } else {
+    print "Wrong input, try again!\n";
+  }
+} until ($y != 9999999.);
+
+my $ppdfilename = "$ppddir/$queue.ppd";
+print "\n";
+print "Saving your settings in $ppdfilename ...\n";
+print "\n";
+
+my @marginsoption = (
+  "*OpenUI *Margins/Page Margins/Offsets: PickOne\n",
+  "*DefaultMargins: Custom\n",
+  "*Margins Default/Driver Default: \"\"\n",
+  "*Margins Custom/Custom (set with 'alignmargins'): \"<</.HWMargins[$ml $mb $mr $mt] /Margins[$x $y]>>setpagedevice\"\n",
+  "*CloseUI: *Margins\n"
+);
+
+# Read PPD file of the chosen printer
+if (!(-f $ppdfilename)) {die "No PPD file $ppdfilename!"};
+open PPDFILE, "$ppdfilename" or die "Can't open $ppdfilename!";
+my @ppdfile = <PPDFILE>;
+close PPDFILE;
+
+# Remove an old margin adjustment option
+
+($_ =~ m!^\s*\*OpenUI\s*\*Margins/.*:! and $_="") foreach @ppdfile;
+($_ =~ m!^\s*\*DefaultMargins:! and $_="") foreach @ppdfile;
+($_ =~ m!^\s*\*Margins\s*.*/.*:! and $_="") foreach @ppdfile;
+($_ =~ m!^\s*\*CloseUI:\s*\*Margins! and $_="") foreach @ppdfile;
+
+# Insert the new margin adjustment option
+
+splice(@ppdfile,-1,0,@marginsoption);
+
+# Write back PPD file
+
+open PPDFILE, ">$ppdfilename" or die "Can't open $ppdfilename";
+print PPDFILE @ppdfile;
+close PPDFILE;
+
+# Re-initialize CUPS (must be done after a "manual" change on the PPD file)
+
+system("killall -HUP cupsd");
+
+print "\n";
+print "Done.\n";
+print "\n";
+print "Now your printer \"$queue\" will use the new margin and offset settings by\n";
+print "default. You can turn them off by switching the option \"Page Margins/Offsets\"\n";
+print "to \"Driver Default\" in kprinter, GTKlp, or XPP.\n";
+print "\n";
+print "On the command line (\"lpr\", \"lp\", \"lpoptions\", ...) use the option\n";
+print "\"-o Margins=Default\" to turn off and \"-o Margins=Custom\" to turn on your\n";
+print "settings.\n";
+print "\n";
+
+exit 0;
+
+## END OF FILE #################################################################
index 51b7a11..842a064 100755 (executable)
@@ -4,7 +4,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Fre Feb 23 23:49:58 CET 2007 [mika]
+# Latest change: Sam Mär 10 10:46:39 CET 2007 [mika]
 ################################################################################
 # Ressources:
 #   http://apt-get.dk/howto/backup/
@@ -23,16 +23,17 @@ check4progs dirvish rsync ssh-keygen ssh-copy-id
 PN="$0"
 CONFFILE=/etc/dirvish/master.conf
 
-# make sure we don't lose any files
-if [ -f "$CONFFILE" ] ; then
-   mv $CONFFILE $CONFFILE.$(date +%Y%m%d).$$
-fi
-
 set +e
 
 write_conffile() {
-  cat > $CONFFILE << EOF
-# Configuration file for dirvish, created by $PN on $(date)
+  if [ -f "$CONFFILE" ] ; then
+     MASTERINFO="Notice: $CONFFILE exists already so I will not touch it.
+Please do not forget to add $CLIENT to the file if you wan to use the 'Runall' functionality."
+  else
+     MASTERINFO="An initial master configuration ($CONFFILE) has been generated.
+Please adjust it according to your needs."
+     cat > $CONFFILE << EOF
+# Master configuration file for dirvish, created by $PN on $(date)
 
 bank:
      $BACKUP_DIR
@@ -42,18 +43,20 @@ exclude:
 #      core
 #      *~
 #      .nfs*
+#      /var/lib/nfs/*tab
 #      var/cache/apt/archives
 #      var/cache/man
-#      tmp
 #      var/tmp
-#       /var/lib/nfs/*tab
-#       .kde/share/cache/*
-#       .firefox/default/*/Cache/*
+#      tmp
+#      /dev
+#      .kde/share/cache/*
+#      .firefox/default/*/Cache/*
 
 Runall:
      $CLIENT 22:00
+     # add-another-client-here 22:00
 
-# See http://www.dirvish.org/debian.howto.html for further details:
+     # See http://www.dirvish.org/debian.howto.html for further details:
 expire-default: +30 days
 expire-rule:
 #       MIN HR    DOM MON       DOW  STRFTIME_FMT
@@ -64,6 +67,7 @@ expire-rule:
 #       *   *     *   *         2-7  +15 days
 
 EOF
+  fi
 }
 
 # TODO / integrate?
@@ -91,6 +95,10 @@ client_name() {
   CLIENT="$(dialog --stdout --inputbox 'Please choose the name for your client instance, also known as vault' 0 0 client1)"
 }
 
+tree_name() {
+  TREE="$(dialog --stdout --inputbox 'Please choose the directory you want to backup from your client (also known as tree)' 0 0 /home)"
+}
+
 create_client_conf() {
   mkdir -p "${BACKUP_DIR}/${CLIENT}/dirvish"
   if [ -f "${BACKUP_DIR}/${CLIENT}/dirvish/default.conf" ] ; then
@@ -99,7 +107,7 @@ create_client_conf() {
      cat > "${BACKUP_DIR}/${CLIENT}/dirvish/default.conf" << EOF
 # Configuration file of client-side for dirvish created by $PN on $(date)
 client: $CLIENTNAME
-tree: /home
+tree: $TREE
 xdev: true
 index: gzip
 image-default: %Y-%m-%d
@@ -141,6 +149,7 @@ display_info() {
   einfo "Running $PN was successful. Enjoy using dirvish!" ; eend 0
   echo
   einfo "Please adjust ${BACKUP_DIR}/${CLIENT}/dirvish/default.conf according to your needs.
+$MASTERINFO  
 Then run the following command to create an initial backup:
 
   dirvish --summary long --vault $CLIENT --init
@@ -170,6 +179,7 @@ esac
 # now run the funtions:
 get_backup_dir     && \
 client_name        && \
+tree_name          && \
 client_setup       && \
 create_client_conf && \
 write_conffile     && \
diff --git a/usr_sbin/grml-quickconfig b/usr_sbin/grml-quickconfig
new file mode 100755 (executable)
index 0000000..354e3cf
--- /dev/null
@@ -0,0 +1,143 @@
+#!/usr/bin/perl 
+# Filename:      grml-quickconfig
+# Purpose:       get fast access to some basic grml-scripts
+# Authors:       Michael Schierl <schierlm-public@gmx.de>, Alexander Wirt <formorer@grml.org>
+# Bug-Reports:   see http://grml.org/bugs/
+# License:       This file is licensed under the GPL v2.
+# Latest change: Sam Mär 17 12:42:50 CET 2007 [mika]
+################################################################################
+
+# menu with quick config options
+
+# enable alternate charset support (needed for screen)
+print "\e(B\e)0";
+
+open (my $fh, '/proc/cmdline'); 
+my $cmdline = <$fh>; 
+close($fh); 
+
+my $color = 1 unless $cmdline =~ /nocolor/; 
+
+# variables for nice display
+if ($color) {
+    $W = "\e[0;32;1m";     # White
+    $N = "\x0f\e[0m";      # Normal
+    $M = "\e[0;35;1m";     # Magenta (for commands)
+    $B = "\e[0;34;1m\x0e"; # Blue, line drawing characters
+} else {
+    $B = "\x0e";
+    $N = "\x0f";
+}
+
+$HLINE=$B."x".$N;      # A single horizontal line drawing character
+
+# menu options
+%menu_commands = (
+       d => 'grml-lang de',
+       a => 'grml-lang at',
+       c => 'grml-lang ch',
+       u => 'grml-lang us', 
+       n => 'grml-network',
+       e => 'netcardconfig',
+       i => 'grml-info',
+       h => 'grml2hd',
+       m => 'pdmenu -c',
+       q => 'exit',
+# x and Return are handled manually
+);
+
+# window managers
+%windowmanagers = (
+       d => 'dwm',
+       e => 'evilwm',
+       f => 'fluxbox',
+       i => 'ion3',
+       j => 'jwm',
+       k => 'pekwm',
+       p => 'pwm3',
+       t => 'twm',
+       v => 'fvwm',
+       2 => 'fvwm2', 
+       c => 'fvwm-crystal',
+       r => 'ratpoison',
+       9 => 'w9wm',
+       w => 'windowlab',
+       m => 'wmi',
+       i => 'wmii',
+       n => 'wm-ng',
+);
+
+# main loop
+while(1) {
+
+# disable input buffering, see
+# man perlfunc | less '+/   getc'
+# for details
+system "stty", '-icanon', 'eol', "\001";
+
+# main loop
+$command="";
+while($command eq "") {
+print <<"EOF";
+
+   ${B}lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk${N}
+   $HLINE Welcome to ${M}grml-quickconfig${M}                            $HLINE 
+   $HLINE Press a highlighted key to perform an action, or press $HLINE
+   $HLINE ${W}Return${N} or ${W}q${N} to go back to the shell.                   $HLINE
+   ${B}tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu${N}
+   $HLINE Set keyboard layout (${M}grml-lang${N}): ${W}d${N}e ${W}a${N}t ${W}c${N}h ${W}u${N}s           $HLINE
+   $HLINE Configure ${W}n${N}etwork (${M}grml-network${N})                       $HLINE
+   $HLINE -> Configure ${W}e${N}thernet card directly (${M}netcardconfig${N})    $HLINE
+   ${B}tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu${N}
+   $HLINE Show ${W}i${N}nformation about grml (${M}grml-info${N})                $HLINE
+   $HLINE Start ${W}x${N} (${M}grml-x${N})                                       $HLINE
+   $HLINE Show an application ${W}m${N}enu (${M}pdmenu${N})                      $HLINE
+   $HLINE Install grml to ${W}h${N}ard disk (${M}grml2hd${N})                    $HLINE
+   ${B}mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj${N}
+
+EOF
+print "Press a key: ".$M;
+$x = getc;
+print $N.$/.$/;
+if (defined($menu_commands{$x})) {
+       $command = $menu_commands{$x};
+} elsif ($x eq "\n") {
+       $command= 'exit';
+} elsif ($x eq "x") {
+       print <<"EOF";
+
+   ${B}lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk${N}
+   $HLINE Select a window manager (unsorted list):               $HLINE 
+   $HLINE Press any other key to return to the main menu.        $HLINE
+   ${B}tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu${N}
+   $HLINE ${W}f${N}luxbox ${W}d${N}wm ${W}e${N}vilwm ion${W}3${N} ${W}j${N}wm pe${W}k${N}wm ${W}p${N}wm3 ${W}t${N}wm ${W}r${N}atpoison   $HLINE
+   $HLINE f${W}v${N}wm fvwm${W}2${N} fvwm-${W}c${N}rystal w${W}9${N}wm ${W}w${N}indowlab w${W}m${N}i wm${W}i${N}i wm-${W}n${N}g  $HLINE
+   ${B}mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj${N}
+
+EOF
+       print "Press a key: ".$M;
+       $x = getc;
+       print $N.$/.$/;
+       if (defined($windowmanagers{$x})) {
+               $command = "su - grml -c 'grml-x ".$windowmanagers{$x}."'";
+       } else {
+               print "Unknown key.\n";
+       }
+} else {
+       print "Unknown key.\n";
+}
+}
+
+# reenable input buffering
+system "stty", 'icanon', 'eol', '^@';
+
+if ($command eq "exit") {
+       last;
+}
+print $W . "Running command: " . $M . $command . $N . $/;
+system($command);
+print $/;
+}
+print "Happy hacking!\n";
+
+## END OF FILE #################################################################
index 3efda81..7079e76 100755 (executable)
@@ -4,7 +4,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Sam Dez 16 18:20:42 CET 2006 [mika]
+# Latest change: Fre Mär 16 22:49:29 CET 2007 [mika]
 ################################################################################
 
 PN="$(basename $0)"
@@ -71,7 +71,7 @@ if [ -z "$NONINTERACTIVE" ] ; then
    LANGUAGE=$($DIALOG --stdout --title "$PN" --default-item $DEFAULT_LANGUAGE --radiolist \
 "Which language do you want to use?
 
-This will affect \$LANG, \$LANGUAGE, \$LC_MESSAGES and \$TZ.
+This will affect \$LANG, \$LANGUAGE and \$LC_MESSAGES.
 
 Notice: if you want to adjust /etc/locale.gen (defines
 which locales should be generated by locale-gen)
@@ -173,7 +173,7 @@ cat > $CONFFILE <<EOF
 LANGUAGE=$LANGUAGE
 LANG=$LANG
 LC_MESSAGES=$LANG
-TZ=$TZ
+TZ=$TZ
 # other environment variables you might want to set:
 # LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY
 # LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE
@@ -185,7 +185,7 @@ fi
 setvalue 'LANGUAGE='    $LANGUAGE
 setvalue 'LANG='        $LANG
 setvalue 'LC_MESSAGES=' $LANG
-setvalue 'TZ='          $TZ
+setvalue 'TZ='          $TZ
 
 retval=$?
 case $retval in
diff --git a/usr_sbin/grml-setservices b/usr_sbin/grml-setservices
new file mode 100755 (executable)
index 0000000..be21363
--- /dev/null
@@ -0,0 +1,104 @@
+#!/bin/sh
+# Filename:      grml-setservices
+# Purpose:       interface for basic configuration of system startup
+# Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
+# Bug-Reports:   see http://grml.org/bugs/
+# License:       This file is licensed under the GPL v2.
+# Latest change: Fre Mär 16 21:54:10 CET 2007 [mika]
+################################################################################
+
+PN="$(basename $0)"
+TMP=$(mktemp)
+DIALOG=dialog
+CONFFILE='/etc/runlevel.conf'
+
+. /etc/grml/script-functions
+. /etc/grml/lsb-functions
+
+check4root || exit 100
+
+bailout(){
+  rm -f "$TMP"
+  exit 0
+}
+
+trap bailout 1 2 3 15
+
+is_value_set(){
+ [ -n "$1" ] || return 2
+ [ -r "$TMP" ] || return 3
+ grep -q "$1" $TMP && return 0 || return 1
+}
+
+INFO="Which services would you like to have enabled on your system?
+
+Notice: this script will adjust your ${CONFFILE}, the
+file which provides the startup configuration for your
+system. You can edit the file manually as well.
+
+If you do not know what to choose just take the defaults
+or choose cancel.
+"
+
+# enable checks only if the according init script is present
+[ -r /etc/init.d/mdadm ]  && SRAID='mdadm!software-raid via mdadm!on'
+[ -r /etc/init.d/dmraid ] && MRAID='dmraid!software-raid via dmraid!off'
+[ -r /etc/init.d/dbus -o -r /etc/init.d/dbus-1 ] && DBUS='dbus!hal/dbus (important for KDE e.g.)!off'
+
+# adjust setup
+set_values(){
+  if is_value_set "mdadm"  ; then
+     update-rc.d -f mdadm remove >/dev/null 2>&1
+     update-rc.d mdadm-raid start 25 S . start 50 0 6 . >/dev/null 2>&1
+     update-rc.d mdadm defaults 25 >/dev/null 2>&1
+  else
+     update-rc.d -f mdadm remove >/dev/null 2>&1
+     update-rc.d mdadm stop 20 0 1 6 . >/dev/null 2>&1
+  fi
+
+  if is_value_set "dmraid" ; then
+     update-rc.d -f dmraid remove >/dev/null 2>&1
+     update-rc.d dmraid start 04 S . start 51 0 6 . >/dev/null
+  else
+     update-rc.d -f dmraid remove >/dev/null 2>&1
+     update-rc.d dmraid stop 20 0 1 6 . >/dev/null 2>&1
+  fi
+
+  if is_value_set "dbus" ; then
+     update-rc.d -f dbus remove >/dev/null 2>&1
+     update-rc.d dbus defaults >/dev/null 2>&1
+  else
+     update-rc.d -f dbus remove >/dev/null 2>&1
+     update-rc.d dbus stop 20 0 1 6 . >/dev/null 2>&1
+  fi
+}
+
+# the interface itself
+oifs="$IFS"
+IFS='!'
+$DIALOG --title "$PN" --checklist "$INFO" 30 65 8 $SRAID $MRAID $DBUS 2>$TMP
+
+retval="$?"
+case $retval in
+    (0)   set_values ;;
+    (1)   echo "Cancel pressed." ; exit 1 ;;
+    (255) echo "ESC pressed."    ; exit 1 ;;
+esac
+
+retval=$?
+case $retval in
+    (0)
+          $DIALOG --title "$PN" --stdout --msgbox "Adjusting system runlevel configuration via $CONFFILE was successful." 0 0
+          esyslog user.notice "$PN" "Writing language settings ($LANGUAGE) to $CONFFILE was successful."
+          ;;
+    *)
+          $DIALOG --title "$PN" --stdout --msgbox "Error writing settings to ${CONFFILE}." 0 0
+          esyslog user.notice "$PN" "Error writing settings to ${CONFFILE}."
+          ;;
+esac
+
+rm -f $TMP
+IFS="$oifs"
+
+## END OF FILE #################################################################
+# vim: ai tw=80 expandtab
diff --git a/usr_share/align.ps b/usr_share/align.ps
new file mode 100644 (file)
index 0000000..2e0d816
--- /dev/null
@@ -0,0 +1,227 @@
+%!PS-Adobe-3.0
+%%Pages: 1
+%%Title: Alignment testpage for Ghostscript
+%%Creator: Dieter Stueken (<EMAIL: PROTECTED>)
+%%BeginProlog
+% Source: http://www.geocrawler.com/archives/3/378/1997/1/50/2064509/
+
+/rectdraw              % <x0> <y0> <x1> <y1> rectdraw -
+ { exch 4 -1 roll exch 2 array astore {0 moveto 0 PH rlineto stroke} forall
+   2 array astore {0 exch moveto PW 0 rlineto stroke} forall
+ } bind def
+
+/arrow         % <ang> <x0> <y0> arrow 
+  { gsave translate rotate
+    0 0 moveto 20 60 lineto -20 60 lineto closepath stroke
+    0 0 moveto 0 80 lineto stroke
+    grestore
+  } bind def
+
+/triangle {    % len ang x y
+       gsave translate dup rotate exch
+       0 setlinewidth
+       0 0 moveto
+       dup 0 lineto
+       dup 0.98 mul dup 10 div lineto
+       closepath
+       gsave 0.65 setgray fill grestore stroke
+       100 10 moveto
+       100 100 2 index {
+               gsave 0 -12 rmoveto 0 24 rlineto stroke grestore
+               gsave 0 24 rmoveto 10 div 2 index neg rotate
+               cvi =string cvs -6 -4 rmoveto show grestore
+               100 10 rmoveto
+       } for
+       0 0 moveto
+       0 10 2 index {
+               pop
+               gsave 0 -6 rmoveto 0 12 rlineto stroke grestore
+               10 1 rmoveto
+       } for
+       pop pop
+       grestore
+} bind def
+
+/round {dup 3 1 roll mul cvi exch div} def
+
+/Show {  % print value or unfold array
+       dup type /realtype eq {100 round} if
+       dup type /nulltype eq
+        { pop (-NULL-) show}
+        {dup type /arraytype eq
+          { ([ ) show {Show} forall ( ]) show}
+         {=string cvs show ( ) show}
+        ifelse }
+        ifelse
+} bind def
+
+/Pval {        % key val, move down 1 line
+       gsave exch
+       gsave Show (:) show grestore
+       150 0 rmoveto Show
+       grestore
+       0 -12 rmoveto
+} bind def
+
+/showtext {
+ /S 80 string def
+ { currentfile S readline pop dup (%END) eq { pop exit } if
+   gsave show grestore 0 -12 rmoveto
+ } loop
+} bind def
+
+/.knownget { 2 copy known { get true } { pop pop false } ifelse } bind def
+
+%%EndProlog
+%%BeginSetup
+
+% you may try different settings here, but start with default settings first
+%<<
+%  /.HWMargins [8.5 38.0 10.5 12.5]
+%  /Margins [-35 -51]
+%>> setpagedevice
+%
+
+%%EndSetup
+%%Page: 1
+
+% printout all values
+
+/Helvetica findfont
+12 scalefont setfont
+120 756 moveto
+
+showtext
+Current settings:
+
+%END
+
+[/OutputDevice
+ /Margins
+ /.HWMargins
+ /.MarginsHWResolution
+ /HWResolution
+ /PageOffset
+ /PageSize
+] { currentpagedevice 1 index
+    .knownget not {(-undefined-)} if Pval
+} forall
+
+showtext
+
+Graphics alignment:
+
+Let the distance in inches from the left edge of the page to the
+vertical line be H, and from the bottom edge to the horizontal line
+be V. You may define the alignment of your page to the paper by
+
+        << /Margins [x y] >> setpagedevice
+with
+%END
+
+gsave
+/res currentpagedevice /.MarginsHWResolution .knownget not {600} if def
+(        x = (1 - H) * ) show res 0 get =string cvs show
+(, y = (V - 1) * ) show res 1 get =string cvs show
+grestore 0 -12 rmoveto
+
+showtext
+
+If set correctly the drawn arrows should extend into the
+papers corners (not the clipping corners). After archieving
+that, you may continue with the clipping edges.
+
+The clipping edges may be set by
+
+        << /.HWMargins [ml mb mr mt] >> setpagedevice
+
+where [ml mb mr mt] are the distances of the clipped edges of
+your graphics relative to the papers edges (left bottom right top)
+measured in 1/72 inches. The wedge shaped rules may be used to
+define these values very accurately as its intersections are in
+1/72 inches. Take the value at the cutoff point from the scale to
+the next clockwise edge. 
+
+Start setting the margin values to all zero to see the natural hardware
+clipping of your printer. You should then define the margins just as big
+enough to keep the defined margins within your printers real hardware
+clipping. This is archieved if you can see the thin line drawn all around
+your defined margin. In addition the thin drawn arrows are just touching
+the margin and should be totally visible.
+
+When you put this settings into your inititializing file "gs_init.ps"
+you may want to apply this setting to a specific printer device only.
+Here is an example of a printer specific setup:
+
+<<
+  /ljet4 <<                   % make entries for some device
+    /.HWMargins [16.0 13.2 13.0 11.1]
+    /Margins [-132 -92]
+  >>
+  /ljet2p <<                  % and for an other devices, too
+    /.HWMargins [14.4  6.8 14.5 17.5]
+    /Margins [-60 -23]
+  >>
+>> currentpagedevice /OutputDevice get
+.knownget {setpagedevice} if
+%END
+
+% get page size
+currentpagedevice /PageSize get aload pop
+/PH exch def
+/PW exch def
+
+1 setlinewidth
+PW   0  0  0 triangle
+PH  90 PW  0 triangle
+PW 180 PW PH triangle
+PH 270  0 PH triangle
+
+% get clipping values
+clippath pathbbox newpath
+
+% show clipping box
+gsave
+1 setlinewidth % 0.65 setgray
+4 copy rectdraw
+grestore
+
+/CT exch def
+/CR exch def
+/CB exch def
+/CL exch def
+
+% draw the alignment lines
+0 setlinewidth
+72 0 moveto 0 CT rlineto stroke
+0 72 moveto CR 0 rlineto stroke
+
+2 setlinewidth
+1 setlinejoin
+1 setlinecap
+
+0 200 moveto 71 0 rlineto -24 -12 rlineto 0 24 rlineto 24 -12 rlineto stroke
+34 206 moveto (H) show
+
+144 0 moveto 0 71 rlineto -12 -24 rlineto 24 0 rlineto -12 24 rlineto stroke
+150 34 moveto (V) show
+
+
+% draw arrows into to the papers corners
+1 setlinewidth
+45
+90 sub dup  0  0 arrow
+90 sub dup  0 PH arrow
+90 sub dup PW PH arrow
+90 sub dup PW  0 arrow
+pop %45
+
+% draw arrows touching the clipping edges
+0 setlinewidth
+  0 PW 2 div CB arrow
+180 PW 2 div CT arrow
+-90 CL PH 2 div arrow
+ 90 CR PH 2 div arrow
+
+showpage
+%%EOF
\ No newline at end of file