patch2mail for SLES10

Posted on April 21st, 2008 by Christian in Life

Well, there is this “nifty” tool called patch2mail, which basically converts the XML for the updates to a more readable format. But you’re screwed if you want to do the same on SLES10. Since it ain’t shipping with the zypper xml wrapper thing, you need to do it a bit different.

So I ended up writing a small (and yet, ugly) shell script to generate me a mail of my liking ..

#!/bin/bash
 
# Checks the output of `zypper pch` for security/recommended/optional
# updates and prepares a detailed report to be mailed to the
# administrators
 
TO="admin-addr@localhost"
CLASSES="security recommended optional"
 
# Temporary files
ZYPP_LIST="$( mktemp /tmp/zypper-list.XXXXXX )"
ZYPP_DETAILS="$( mktemp /tmp/zypper-details.XXXXXX )"
TMP="$( mktemp /tmp/zypper-report.XXXXXX )"
zypper pch 2>/dev/null > $ZYPP_LIST
 
# Figure out how much updates are still pending
PENDING="$( cat $ZYPP_LIST | grep "| Needed" | wc -l )"
 
if [ $PENDING -eq 0 ] ; then
  exit 0
fi
 
echo > $TMP
echo " Pending updates for $( domainname -f ) on $( date )" >> $TMP
 
for severity in $CLASSES; do
  PACKAGES="$( cat $ZYPP_LIST | egrep "${severity}|>(.*)\| Needed" | \
    cut -d\| -f2 | sed "s,^ ,," )"
  echo
  echo "  Category: $severity"
  for package in $PACKAGES; do
    zypper patch-info $package 2>/dev/null > $ZYPP_DETAILS
    echo "  * $package ($( cat $ZYPP_DETAILS | grep "Version: " | \
      sed "s,Version,version," ))"
    echo "    $( cat $ZYPP_DETAILS | grep "Summary: ")"
    echo "    $( cat $ZYPP_DETAILS | grep "Reboot Required:" )"
    echo
  done
  echo
done >> $TMP
 
cat $TMP | \
  mail -s "[$( date +%F )] Update report for $( domainname -f )" $TO
trap 'rm -f "$TMP" "$ZYPP_LIST" "$ZYPP_DETAILS" >/dev/null 2>&1' 0
trap "exit 2" 1 2 3 15
 
# vim: set tw=80

April 19th

Posted on April 20th, 2008 by Christian in Life

Well, as some people already figured out; yesterday was my birthday. Chrissy noted it on my blog, as well as about every channel we’re together in (so did Chris); so thanks a lot for that ;-)

Anyway, Saturday morning as I was forced to head downstairs due to my aunt calling (that was at 9am), my brother managed to take a shot at the presents as well as something else:

Cat'se ontop of presents

Well, ain’t he cute ? He’s always been particularly fond of lying around on paper. Well, anyway I had a lil’ birthday party planned in combination of myself and a friend of mine, so I invited some of my friends from work over to our place. Turns out, it was quite a nice gathering.

Benches
 
Barbeque grill

I had lots of fun that evening (well, my birthday is the only day in the year I allow myself to get drunk!) apparently, so did all the others.


That’s why …

Posted on April 17th, 2008 by Christian in Life

… I’d break a butterfly on a wheel … I was coming out of the office, and found my car this way:

Up close (click on the image for a larger version)

Birdie view (click on the image for a larger version)

Well happy me, I had some sort of cleanup detail for 20:00 local time (as in get all that birdie poooo of my damn roof!), and surprisingly once I was finished cleaning all the shit up, it started raining. Now, I’m never, *ever* gonna park below that dove/whateverdamndevilbirdyouare housing tree no more!


Software support and “key account” managers

Posted on April 14th, 2008 by Christian in Life

As Mike wrote about his experiences with hardware vendors, I’m gonna devote this here post to my favorite software company in the world. We recently bought two copies of a software called “2X Application Server Enterprise Edition“. As one would think from reading the specs of the software, it’s near a Citrix solution (which it is, at least for a small part); but in return it’s faaaar away concerning the price. Just so you get an idea, about what I’m meaning with “faaar“:

Windows Server 2003:
Standard Edition:        2 * 91,00
CAL:                    50 *  6,00
Terminal Server CAL:    50 * 17,00
                       ___________
                          1.332,00

The above are fixed costs, you need them anyway as both Citrix as well as the 2X solution is only working *on top* of Windows Server 2003 Terminal Services.

Now, here’s the real comparison between 2X Application Server & Loadbalancer and Citrix XenApp Platinum Edition:

2X               2 * 1510,00 =  3.020,00
Citrix          50 *  393,00 = 19.650,00

While 2X is licensed per terminal server, XenApp is licensed per user. As you can see from the above prices, the 2X solution is roughly 1/6 of the Citrix XenApp solution.

Read the rest of this entry »


April weather

Posted on April 8th, 2008 by Christian in Life

Well, it’s April. And usually when it’s April, there’s April’s weather. In the morning I was rather surprised by the weather.

And after I picked up Michel, we some when arrived at work (that is one hour later), we had our own adventure park in front of the work place:

Collapsed trees

Apparently, the trees in at the entrance collapsed (thanks to Michel for the pictures), so we had to make our way through somehow … was rather funny way to start the day … *shrug*