From 5f2575eadc32f52c84154034c12eade7df82a087 Mon Sep 17 00:00:00 2001 From: Ulrich Dangel Date: Sat, 30 Jan 2010 15:03:26 +0100 Subject: [PATCH] Moved grml-quickconfig to extra debian package. --- debian/changelog | 6 ++ debian/control | 2 +- debian/rules | 1 - manpages/grml-quickconfig.8 | 24 ------- usr_sbin/grml-quickconfig | 156 -------------------------------------------- 5 files changed, 7 insertions(+), 182 deletions(-) delete mode 100644 manpages/grml-quickconfig.8 delete mode 100755 usr_sbin/grml-quickconfig diff --git a/debian/changelog b/debian/changelog index a1a4b87..f1c1adf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +grml-scripts (1.2.3) UNRELEASED; urgency=low + + * Moved grml-quickconfig to extra package. + + -- Ulrich Dangel Sat, 30 Jan 2010 15:08:01 +0100 + grml-scripts (1.2.2) unstable; urgency=low * Remove deprecated bt-audio script. diff --git a/debian/control b/debian/control index 7a7f096..b9a2de2 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Vcs-Browser: http://git.grml.org/?p=grml-scripts.git Package: grml-scripts Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, less, dialog, perl, zsh, dash, links | w3m | links2, screen, grml-network, grml-etc-core, libterm-readkey-perl, lzop -Suggests: ruby, python, grml-x, ipcalc, hwinfo, antiword, grml-etc, grml-rebuildfstab, grml-scanpartitions, grml-files, grml-hwinfo, pptp-linux, flite, wmii, mutt, slrn, grml-docs, grml-autoconfig (>= 0.6.9), dirvish, sudo, idesk, xlockmore, python-dbus, notification-daemon +Suggests: ruby, python, grml-x, ipcalc, hwinfo, antiword, grml-etc, grml-rebuildfstab, grml-scanpartitions, grml-files, grml-hwinfo, pptp-linux, flite, wmii, mutt, slrn, grml-docs, grml-autoconfig (>= 0.6.9), dirvish, sudo, idesk, xlockmore, python-dbus, notification-daemon, grml-quickconfig 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: diff --git a/debian/rules b/debian/rules index 901a4b8..06c7c00 100755 --- a/debian/rules +++ b/debian/rules @@ -61,7 +61,6 @@ binary-arch: build install 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/grml-setservices.8 manpages/grml-quickconfig.8 \ manpages/iso-term.1 manpages/alignmargins.8 manpages/get_3ware.1 \ manpages/grml-init-multitail.1 # cp --no-dereference man/*.1.gz debian/grml-scripts/usr/share/man/man1/ diff --git a/manpages/grml-quickconfig.8 b/manpages/grml-quickconfig.8 deleted file mode 100644 index 0c38126..0000000 --- a/manpages/grml-quickconfig.8 +++ /dev/null @@ -1,24 +0,0 @@ -.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 . -.PP -This manual page was written by Michael Prokop - for the grml project (but may be used by others). diff --git a/usr_sbin/grml-quickconfig b/usr_sbin/grml-quickconfig deleted file mode 100755 index cb4ab85..0000000 --- a/usr_sbin/grml-quickconfig +++ /dev/null @@ -1,156 +0,0 @@ -#!/usr/bin/perl -# Filename: grml-quickconfig -# Purpose: get fast access to some basic grml-scripts -# Authors: Michael Schierl , Alexander Wirt -# Bug-Reports: see http://grml.org/bugs/ -# License: This file is licensed under the GPL v2. -################################################################################ - -# menu with quick config options - -use Term::ReadKey; -use Fcntl qw(F_GETFL F_SETFL O_NONBLOCK); - -# 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', - s => 'grml-lang es', - n => 'grml-network', - e => 'netcardconfig', - i => 'grml-info', - h => 'grml2hd', - m => 'pdmenu -c', - q => 'exit', -# x and Return are handled manually -); - -# window managers -%windowmanagers = ( - a => 'awesome', - d => 'dwm', - e => 'evilwm', - f => 'fluxbox', - v => 'fvwm', - 2 => 'fvwm2', - c => 'fvwm-crystal', - j => 'jwm', - o => 'openbox', - k => 'pekwm', - r => 'ratpoison', - t => 'twm', - 9 => 'w9wm', - w => 'windowlab', - i => 'wmii', - n => 'wm-ng', -); - -sub getKey -{ - print "Press a key: ".$M; - ReadMode 4; # Turn off controls keys - - # HACK: this is necessary because startx/Xorg sets the console where it outputs - # to non-blocking mode - $flags = fcntl(STDIN, F_GETFL, 0) or die "Can't get flags for STDIN: $!\n"; - $flags = fcntl(STDIN, F_SETFL, $flags & ~O_NONBLOCK) or die "Can't set flags for STDIN: $!\n"; - - while (not defined ($x = ReadKey(0))) {} - ReadMode 0; # Reset tty mode before exiting - return $x; -} - -# main loop -while(1) { -# 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 e${W}s${N} ${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 - $x = getKey(); - - print $N.$/.$/; - if (defined($menu_commands{$x})) { - $command = $menu_commands{$x}; - } elsif ($x eq "\n" || $x eq ' ') { - $command= 'exit'; - } elsif ($x eq "x") { - print <<"EOF"; - - ${B}lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk${N} - $HLINE Select a window manager (unsorted list): $HLINE - $HLINE Press any other key to return to the main menu. $HLINE - ${B}tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu${N} - $HLINE ${W}a${N}wesome ${W}d${N}wm ${W}e${N}vilwm ${W}f${N}luxbox f${W}v${N}wm fvwm${W}2${N} fvwm-${W}c${N}rystal ${W}j${N}wm ${N}$HLINE - $HLINE ${W}o${N}penbox pe${W}k${N}wm ${W}r${N}atpoison ${W}t${N}wm w${W}9${N}wm ${W}w${N}indowlab wm${W}i${N}i wm-${W}n${N}g ${N}$HLINE - ${B}mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj${N} - -EOF - $x = getKey(); - - print $N.$/.$/; - if (defined($windowmanagers{$x})) { - $command = "su - grml -c 'grml-x ".$windowmanagers{$x}."'"; - } else { - print "Unknown key, not bound to a windowmanager.\n"; - print "Returning to main menu.\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 ################################################################# -# vim: ai expandtab ft=perl -- 2.1.4