[BACK]Return to post_dmesg_to_nycbug CVS log [TXT][DIR] Up to [local] / openbsd / update_openbsd

Diff for /openbsd/update_openbsd/post_dmesg_to_nycbug between version 1.5 and 1.6

version 1.5, 2015/03/03 18:56:08 version 1.6, 2016/10/04 02:44:20
Line 2 
Line 2 
 use strict;  use strict;
 use warnings;  use warnings;
 use feature 'say';  use feature 'say';
   use feature 'signatures';
   no warnings 'experimental::signatures';
   
 use Sys::Hostname;  use Sys::Hostname;
 use HTTP::Tiny;  use HTTP::Tiny;
   
 # This script posts your OpenBSD dmesg to the NYC*BUG dmesg archive.  # This script posts your OpenBSD dmesg to the NYC*BUG dmesg archive.
   
   sub sysctl (@s) {
       open my $de, '-|', qw( sysctl -n ), @s or die $!;
       my $s = join ' ', split /\s+/s,
           do { local $/ = undef; readline $de };
       close $de or die $!;
       return $s;
   }
   
 my $nickname = "$ENV{USER}";  my $nickname = "$ENV{USER}";
 my $email    = "$ENV{USER}\@" . hostname();  my $email    = "$ENV{USER}\@" . hostname();
   
Line 19 
Line 29 
 my $description = "@ARGV";  my $description = "@ARGV";
   
 while ( @sysctls and not $description ) {  while ( @sysctls and not $description ) {
     my @s = @{ shift @sysctls };      $description = sysctl @{ shift @sysctls };
   }
   
     open my $de, '-|', qw( sysctl -n ), @s or die $!;  if (my $version = sysctl qw( kern.version )) {
     $description = join ' ', split /\s+/s,      $version =~ s/\)\K.*//;
         do { local $/ = undef; readline $de };      $description = "$version on $description";
     close $de or die $!;  
 }  }
   
 print "About to post '$description', OK? ";  print "About to post '$description', OK? ";

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>