@@ -1,8 +1,8 @@
#!/bin/bash
# add sles repos script
# Author: Carsten Schoene
-# $$LastChangedDate: 2012-09-26 20:56:41 +0200 (Mi, 26. Sep 2012) $
-# $Rev: 1870 $
+# $$LastChangedDate: 2015-07-20 17:05:20 +0200 (Mo, 20. Jul 2015) $
+# $Rev: 10403 $
#
BASEURL="http://sles.internetx.de/suse/"
SRELFILE="/etc/SuSE-release"
@@ -53,6 +53,14 @@
PREFIX="-SP2"
LPREFIX="-sp2"
AUTOCONFIG="1"
+ elif [ "${PATCHLEVEL}" == "3" ] ; then
+ PREFIX="-SP3"
+ LPREFIX="-sp3"
+ AUTOCONFIG="1"
+ elif [ "${PATCHLEVEL}" == "4" ] ; then
+ PREFIX="-SP4"
+ LPREFIX="-sp4"
+ AUTOCONFIG="1"
else
echo "Unsupported SuSE distribution"
exit 3
@@ -76,8 +84,8 @@
fi
if [ "${AUTOCONFIG}" == "0" ] ; then
if [ "${2}" == "" ] ; then
- PREFIX="-SP2"
- LPREFIX="-sp2"
+ PREFIX="-SP4"
+ LPREFIX="-sp4"
else
PREFIX="${2}"
LPREFIX=`echo ${2} | awk '{print tolower($1)}'`
@@ -97,10 +105,11 @@
SDKDIST="${BASEURL}sle-${VERSION}sdk${SUFFIX}${LPREFIX}/;SLE-${VERSION}-SDK${SUFFIX}${PREFIX}"
HAEDIST="${BASEURL}sle-${VERSION}hae${SUFFIX}${LPREFIX}/;SLE-${VERSION}-HAE${SUFFIX}${PREFIX}"
BASEUPDATE="${BASEURL}update/SLE/${DIST}${VERSION}${PREFIX}-Updates/sle-${VERSION}-${ARCH}/;${DIST}${VERSION}${PREFIX}-Updates"
-EXTRAUPDATE="${BASEURL}update/SLE/${DIST}${VERSION}-Extras/sle-${VERSION}-${ARCH}/;${DIST}${VERSION}-Extras"
+#EXTRAUPDATE="${BASEURL}update/SLE/${DIST}${VERSION}-Extras/sle-${VERSION}-${ARCH}/;${DIST}${VERSION}-Extras"
HAEUPDATE="${BASEURL}update/SLE/SLE${VERSION}-HAE${PREFIX}-Updates/sle-${VERSION}-${ARCH}/;SLE-${VERSION}-HAE${PREFIX}-Updates"
SDKUPDATE="${BASEURL}update/SLE/SLE${VERSION}-SDK${PREFIX}-Updates/sle-${VERSION}-${ARCH}/;SLE-${VERSION}-SDK${PREFIX}-Updates"
#SMTUPDATE="${BASEURL}update/SLE/SLE${VERSION}-SMT${PREFIX}-Updates/sle-${VERSION}-${ARCH}/;SLE-${VERSION}-SMT${PREFIX}-Updates"
+SECUPDT="${BASEURL}update/SLE/SLE11-Security-Module/sle-${VERSION}-${ARCH}/;SLE-11-Security-Module"
# SP1 Update repos needed on SP2 - see https://www.suse.com/support/kb/doc.php?id=7010225
if [ "${PREFIX}" == "-SP2" ] && [ "${LPREFIX}" == "-sp2" ] ; then
@@ -111,7 +120,16 @@
SDKUPDATESP1=""
fi
-for DATASET in ${BASEDIST} ${SDKDIST} ${HAEDIST} ${BASEUPDATE} ${BASEUPDATESP1} ${EXTRAUPDATE} ${HAEUPDATE} ${SDKUPDATE} ${SDKUPDATESP1} ${SMTUPDATE} ; do
+# SLE11 Security Module is only for SLE11-SP3
+if [ "${PREFIX}" == "-SP3" ] && [ "${LPREFIX}" == "-sp3" ] ; then
+ SECUPDTCHAN="${SECUPDT}"
+elif [ "${PREFIX}" == "-SP4" ] && [ "${LPREFIX}" == "-sp4" ] ; then
+ SECUPDTCHAN="${SECUPDT}"
+else
+ SECUPDTCHAN=""
+fi
+
+for DATASET in ${BASEDIST} ${SDKDIST} ${HAEDIST} ${BASEUPDATE} ${BASEUPDATESP1} ${EXTRAUPDATE} ${HAEUPDATE} ${SDKUPDATE} ${SDKUPDATESP1} ${SMTUPDATE} ${SECUPDTCHAN} ; do
REPO=`echo ${DATASET} | awk -F\; '{print $1}'`
REPOALIAS=`echo ${DATASET} | awk -F\; '{print $2}'`
|