X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=grml-tips;h=02744430d935120141dd58803c99f7ba6cb8eb64;hb=2921387803f7aab54846fed5f545d651ffa8d32b;hp=5d02b3031b0c3728216c37545e44cb83a9f116fd;hpb=c54e8bb9d908edc187da1e81ab995a6c9f067fde;p=grml-tips.git diff --git a/grml-tips b/grml-tips index 5d02b30..0274443 100755 --- a/grml-tips +++ b/grml-tips @@ -110,7 +110,7 @@ if (!$tip_flag) { "The grml team will write tips for the most requested and useful keywords.\n", "To use this feature you'll need a working networking connection.\n", "No personal data will be transmitted to the database.\n\n", - "Send \"$pattern\" to grml's keyword database? [y|N]"; + "Send \"$pattern\" to grml's keyword database? [y|N] "; ReadMode 4; # Turn off controls keys my $x; @@ -124,7 +124,13 @@ if (!$tip_flag) { if ( -f '/etc/grml_version' ) { open (my $fh, '<', '/etc/grml_version') or die "Could not open /etc/grml_version: $!"; $version = <$fh>; + chomp $version; close ($fh); + } elsif ( -f '/etc/debian_version') { + open (my $fh, '<', '/etc/debian_version') or die "Could not open /etc/debian_version: $!"; + $version = <$fh>; + chomp $version; + close ($fh); } else { $version = 'unknown'; } @@ -139,7 +145,7 @@ if (!$tip_flag) { if ($res->is_success) { my $content = $res->decoded_content; if ($content =~ /Submission received/) { - print "'$pattern' submitted\n"; + print "Keyword '$pattern' has been submitted to grml's keyword database.\nThanks."; } else { print "Your pattern could not be submitted.\n", "Please file a bug against grml-tips at ", @@ -151,6 +157,9 @@ if (!$tip_flag) { } + } else { + print "'$pattern' has not been sent to grml's keyword database as requested.\n"; + print "If you want to submit a tip please mail it to tips\@grml.org - thank you!\n"; } }