#!/bin/bash

PSI=$1

echo
if [ "$1" = "" ]; then
    echo "Usage: $( basename $0 ) -psi|-sl"; echo
    exit 1
fi

if [ "$1" = "-psi" ]; then
    echo "Update PSI SL4"; echo
    sed -i -e '/exclude=.*/d' /etc/yum.conf.http
    sed -i -e 's/exactarch=1/exactarch=1\nexclude=kernel-2*,kernel-dev*,kernel-module*/' /etc/yum.conf.http
    yum -c /etc/yum.conf.http update
else
    echo "Update original SL4"; echo
    yum -c /etc/yum.conf.psi update
fi

