From: Petter Reinholdtsen
Date: Fri, 6 Mar 2009 15:14:54 +0000 (+0000)
Subject: Regenerert.
X-Git-Url: https://pere.pagekite.me/gitweb/homepage.git/commitdiff_plain/9ca7d38368032ab604c2a582bdf7c101270cc9b6?ds=inline;hp=ce19ccffa6c14e418a80e2654a094418c7886a0c
Regenerert.
---
diff --git a/blog/Checking_server_hardware_support_status_for_Dell__HP_and_IBM_servers.html b/blog/Checking_server_hardware_support_status_for_Dell__HP_and_IBM_servers.html
index f3186f2eb4..0898222434 100644
--- a/blog/Checking_server_hardware_support_status_for_Dell__HP_and_IBM_servers.html
+++ b/blog/Checking_server_hardware_support_status_for_Dell__HP_and_IBM_servers.html
@@ -76,13 +76,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();
@@ -123,6 +135,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 =
@@ -161,7 +174,12 @@ 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.
diff --git a/blog/archive/2009/02/02.rss b/blog/archive/2009/02/02.rss
index af03604c65..e3adfe8562 100644
--- a/blog/archive/2009/02/02.rss
+++ b/blog/archive/2009/02/02.rss
@@ -276,13 +276,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();
@@ -323,6 +335,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 =
@@ -361,7 +374,12 @@ print get_support_info("ibm.host", "IBM eserver xSeries 345 -[867
</pre>
<p>I would recommend this approach for tracking support contracts for
-everyone with more than a new computers to administer. :)</p>
+everyone with more than a few computers to administer. :)</p>
+
+<p>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.</p>
diff --git a/blog/archive/2009/02/index.html b/blog/archive/2009/02/index.html
index e44d91f70e..5b85938175 100644
--- a/blog/archive/2009/02/index.html
+++ b/blog/archive/2009/02/index.html
@@ -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,7 +483,12 @@ 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.
diff --git a/blog/index.rss b/blog/index.rss
index b5a68d7120..f3a04b13ec 100644
--- a/blog/index.rss
+++ b/blog/index.rss
@@ -105,13 +105,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();
@@ -152,6 +164,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 =
@@ -190,7 +203,12 @@ print get_support_info("ibm.host", "IBM eserver xSeries 345 -[867
</pre>
<p>I would recommend this approach for tracking support contracts for
-everyone with more than a new computers to administer. :)</p>
+everyone with more than a few computers to administer. :)</p>
+
+<p>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.</p>
diff --git a/blog/tags/english/english.rss b/blog/tags/english/english.rss
index 0d39669db5..79cce7b906 100644
--- a/blog/tags/english/english.rss
+++ b/blog/tags/english/english.rss
@@ -252,13 +252,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();
@@ -299,6 +311,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 =
@@ -337,7 +350,12 @@ print get_support_info("ibm.host", "IBM eserver xSeries 345 -[867
</pre>
<p>I would recommend this approach for tracking support contracts for
-everyone with more than a new computers to administer. :)</p>
+everyone with more than a few computers to administer. :)</p>
+
+<p>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.</p>
diff --git a/blog/tags/english/index.html b/blog/tags/english/index.html
index 0c0aac3725..f70784cc2f 100644
--- a/blog/tags/english/index.html
+++ b/blog/tags/english/index.html
@@ -336,13 +336,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();
@@ -383,6 +395,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 =
@@ -421,7 +434,12 @@ 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.
diff --git a/blog/tags/nuug/nuug.rss b/blog/tags/nuug/nuug.rss
index 76833ab5fc..b005958d6a 100644
--- a/blog/tags/nuug/nuug.rss
+++ b/blog/tags/nuug/nuug.rss
@@ -801,13 +801,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();
@@ -848,6 +860,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 =
@@ -886,7 +899,12 @@ print get_support_info("ibm.host", "IBM eserver xSeries 345 -[867
</pre>
<p>I would recommend this approach for tracking support contracts for
-everyone with more than a new computers to administer. :)</p>
+everyone with more than a few computers to administer. :)</p>
+
+<p>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.</p>