X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_sbin%2Fgrml-quickconfig;h=354e3cf7594a1823446050f5db25754d182b4f46;hb=a40272445f7ab16b264c87f7393bfb76dbcad9df;hp=865e0a040b989efd6f8e6b51d6ae0a9b1c885ddb;hpb=470961a79c6f99cdec8d3063e4ad89ca6297982b;p=grml-scripts.git diff --git a/usr_sbin/grml-quickconfig b/usr_sbin/grml-quickconfig index 865e0a0..354e3cf 100755 --- a/usr_sbin/grml-quickconfig +++ b/usr_sbin/grml-quickconfig @@ -1,7 +1,7 @@ #!/usr/bin/perl # Filename: grml-quickconfig # Purpose: get fast access to some basic grml-scripts -# Authors: Michael Schierl +# Authors: Michael Schierl , Alexander Wirt # 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] @@ -12,11 +12,23 @@ # 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 -$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 +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 @@ -24,6 +36,7 @@ $HLINE=$B."x".$N; # A single horizontal line drawing character d => 'grml-lang de', a => 'grml-lang at', c => 'grml-lang ch', + u => 'grml-lang us', n => 'grml-network', e => 'netcardconfig', i => 'grml-info', @@ -72,7 +85,7 @@ print <<"EOF"; $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 $HLINE + $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}