X-Git-Url: http://pere.pagekite.me/gitweb/homepage.git/blobdiff_plain/3badb7c4cc6106f62336d52926d37e0c406299a1..10debe066a2b5541ad45a7d533c20240c1c3e78a:/blog/archive/2009/02/index.html diff --git a/blog/archive/2009/02/index.html b/blog/archive/2009/02/index.html index e44d91f70e..0b4a543aa7 100644 --- a/blog/archive/2009/02/index.html +++ b/blog/archive/2009/02/index.html @@ -3,7 +3,7 @@ Petter Reinholdtsen: entries from February 2009 - + @@ -11,7 +11,7 @@

- Petter Reinholdtsen + Petter Reinholdtsen

@@ -22,7 +22,7 @@
2009-02-01 15:06 @@ -56,7 +56,7 @@ forretningshemmeligheter framover.

- Tags: norsk, nuug. + Tags: norsk, nuug.
@@ -64,7 +64,7 @@ forretningshemmeligheter framover.

2009-02-01 18:35 @@ -91,7 +91,7 @@ nå får vi se om noen er enig.

- Tags: norsk, personvern. + Tags: norsk, personvern.
@@ -99,7 +99,7 @@ nå får vi se om noen er enig.

2009-02-03 13:30 @@ -144,7 +144,7 @@ arbeidet.

- Tags: 3d-printer, norsk, nuug, reprap. + Tags: 3d-printer, norsk, nuug, reprap.
@@ -152,7 +152,7 @@ arbeidet.

2009-02-11 06:30 @@ -176,7 +176,7 @@ webserver og komprimert.

- Tags: norsk, nuug, video. + Tags: norsk, nuug, video.
@@ -184,7 +184,7 @@ webserver og komprimert.

2009-02-15 11:50 @@ -210,7 +210,7 @@ bootsekvens tilgjengelig i stabil utgave, vha pakken - Tags: debian, debian edu, norsk. + Tags: debian, debian edu, norsk.
@@ -218,7 +218,7 @@ bootsekvens tilgjengelig i stabil utgave, vha pakken
2009-02-15 22:30 @@ -250,7 +250,7 @@ automatisk over i spesialkartet.

- Tags: norsk, personvern. + Tags: norsk, personvern.
@@ -258,7 +258,7 @@ automatisk over i spesialkartet.

2009-02-20 08:50 @@ -313,7 +313,7 @@ easier automatic tracking of computers.

- Tags: english, nuug. + Tags: english, nuug.
@@ -321,7 +321,7 @@ easier automatic tracking of computers.

2009-02-28 23:50 @@ -385,13 +385,25 @@ sub get_support_info { foreach my $line (@lines) { next unless ($line =~ m/Beskrivelse/); $line =~ s/<[^>]+?>/;/gm; - $line =~ m%;(\d{2})/(\d{2})/(\d{4});+(\d{2})/(\d{2})/(\d{4});%g; - my $start = "$3-$1-$2"; - my $end = "$6-$4-$5"; - $str = "$start -> $end"; + $line =~ s/^.+?;(Beskrivelse;)/$1/; + + my @f = split(/\;/, $line); + @f = @f[13 .. $#f]; + my $lastend = ""; + while ($f[3] eq "DELL") { + my ($type, $startstr, $endstr, $days) = @f[0, 5, 7, 10]; + + my $start = POSIX::strftime("%Y-%m-%d", + localtime(str2time($startstr))); + my $end = POSIX::strftime("%Y-%m-%d", + localtime(str2time($endstr))); + $str .= "$type $start -> $end "; + @f = @f[14 .. $#f]; + $lastend = $end if ($end gt $lastend); + } my $today = POSIX::strftime("%Y-%m-%d", localtime(time)); tag_machine_unsupported($machine) - if ($end lt $today); + if ($lastend lt $today); } } elsif ( $model =~ m/^HP / ) { my $mech = WWW::Mechanize->new(); @@ -432,6 +444,7 @@ sub get_support_info { if ($end lt $today); } } elsif ( $model =~ m/^IBM / ) { + # This code ignore extended support contracts. my ($producttype) = $model =~ m/.*-\[(.{4}).+\]-/; if ($producttype && $serial) { my $content = @@ -470,20 +483,25 @@ print get_support_info("ibm.host", "IBM eserver xSeries 345 -[867061X]-",

I would recommend this approach for tracking support contracts for -everyone with more than a new computers to administer. :)

+everyone with more than a few computers to administer. :)

+ +

Update 2009-03-06: The IBM page do not include extended support +contracts, so it is useless in that case. The original Dell code do +not handle extended support contracts either, but has been updated to +do so.

- Tags: english, nuug. + Tags: english, nuug.
-

RSS Feed

+

RSS Feed

@@ -492,23 +510,58 @@ everyone with more than a new computers to administer. :)

Archive