X-Git-Url: http://git.grml.org/?p=grml-tips.git;a=blobdiff_plain;f=grml-tips;h=fc9fd39f7b27b01d733b8a0b67b3011a4d68f96d;hp=f9d562f0c04a2e825ba83fb93a802c39c81a04b6;hb=42d529ed4951169521e868ba6bd35abc70de8c1a;hpb=a048656b41f3e4179517065803b862fd94182185 diff --git a/grml-tips b/grml-tips index f9d562f..fc9fd39 100755 --- a/grml-tips +++ b/grml-tips @@ -105,12 +105,12 @@ while (my $line = <$fh>) { close($fh); if (!$tip_flag) { - print "Sorry, could not find a tip for '$pattern'. :-(\n", + print "Sorry, could not find a tip for '$pattern'. :-(\n\n", "Do you want to submit the keyword '$pattern' to grml's keyword database?\n", "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", + "To use and contribute to 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; @@ -126,6 +126,11 @@ if (!$tip_flag) { $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'; } @@ -140,11 +145,11 @@ 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.\n"; } else { print "Your pattern could not be submitted.\n", "Please file a bug against grml-tips at ", - "http://bts.grml.org.\n", + "http://bts.grml.org/\n", "Thanks!\n"; } } else { @@ -152,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"; } }