Dell Warranty check
cupertino at gmx.net
cupertino at gmx.net
Fri Aug 22 13:05:55 CDT 2008
you can simplify your script by using:
dmidecode -s system-serial-number
cheers
-------- Original-Nachricht --------
> Datum: Fri, 22 Aug 2008 12:49:49 -0500
> Von: "Sabuj Pattanayek" <sabujp at gmail.com>
> An: linux-poweredge at dell.com
> Betreff: Re: Dell Warranty check
> Hi,
>
> >
> http://support.euro.dell.com/support/topics/topic.aspx/emea/shared/support/my_systems_info/en/details?ServiceTag=%s
>
> I've been looking for a url like that without having to log in so I
> could do the following:
>
> #!/bin/bash
>
> # run as root, with sudo, or /usr/sbin/dmidecode must be setuid root
>
> serial=`/usr/sbin/dmidecode | grep -i "Serial Number" | head -1 | awk
> -F' ' '{print $3}'`
> daysLeft=`wget -q
> "http://support.euro.dell.com/support/topics/topic.aspx/emea/shared/support/my_systems_info/en/details?ServiceTag=${serial}"
> -O - | grep contract_table | awk -F'<td' '{print $12}' | awk -F'>'
> '{print $2}' | awk -F'<' '{print $1}'`
> if [[ -n $daysLeft ]]; then
> echo $daysLeft
> else
> daysLeft=`wget -q
> "http://support.euro.dell.com/support/topics/topic.aspx/emea/shared/support/my_systems_info/en/details?ServiceTag=${serial}"
> -O - | grep contract_table | awk -F'<td' '{print $12}' | awk -F'>'
> '{print $4}' | awk -F'<' '{print $1}'`
> echo $daysLeft
> fi
>
> Thanks,
> Sabuj Pattanayek
> CSBSysAdmin, http://structbio.vanderbilt.edu
>
> _______________________________________________
> Linux-PowerEdge mailing list
> Linux-PowerEdge at dell.com
> http://lists.us.dell.com/mailman/listinfo/linux-poweredge
> Please read the FAQ at http://lists.us.dell.com/faq
More information about the Linux-PowerEdge
mailing list