[-]
[+]
|
Deleted |
root.tar.bz2/add_sle_repos.sh
|
@@ -1,138 +0,0 @@
-#!/bin/bash
-# add sles repos script
-# Author: Carsten Schoene
-# $$LastChangedDate: 2015-07-20 17:05:20 +0200 (Mo, 20. Jul 2015) $
-# $Rev: 10403 $
-#
-BASEURL="http://sles.internetx.de/suse/"
-SRELFILE="/etc/SuSE-release"
-AUTOCNFIG="0"
-
-function usage {
- echo "Usage: $0 [ SLES | SLED ]"
- exit 1
-}
-
-if [ -f ${SRELFILE} ] ; then
- # get distribution type
- if [ -n "`grep -i server ${SRELFILE}`" ] ; then
- DIST="SLES"
- LDIST="sles"
- elif [ -n "`grep -i desktop ${SRELFILE}`" ] ; then
- DIST="SLED"
- LDIST="sled"
- else
- echo "Unsupported SuSE distribution"
- exit 1
- fi
-
- # get version
- if [ -n "`grep -i ^version ${SRELFILE}`" ] ; then
- VERSION=`cat ${SRELFILE} |grep -E '(^VERSION)' |sed -e s@" "@""@g|awk -F= '{print $2}'`
- else
- echo "Unsupported SuSE distribution"
- exit 2
- fi
- # get patchlevel
- if [ -n "`grep -i ^patchlevel ${SRELFILE}`" ] ; then
- PATCHLEVEL=`cat ${SRELFILE} |grep -E '(^PATCHLEVEL)' |sed -e s@" "@""@g|awk -F= '{print $2}'`
- else
- PATCHLEVEL="GA"
- fi
-
- if [ "${VERSION}" == "11" ] ; then
- if [ "${PATCHLEVEL}" == "GA" ] ; then
- PREFIX=""
- LPREFIX=""
- AUTOCONFIG="1"
- elif [ "${PATCHLEVEL}" == "1" ] ; then
- PREFIX="-SP1"
- LPREFIX="-sp1"
- AUTOCONFIG="1"
- elif [ "${PATCHLEVEL}" == "2" ] ; then
- 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
- fi
- else
- echo "Unsupported SuSE distribution"
- exit 4
- fi
-fi
-
-if [ "${AUTOCONFIG}" == "0" ] ; then
- if [ "${1}" == "" ] ; then
- DIST="SLES"
- else
- if [ "${1}" != "SLES" ] || [ "${1}" != "SLED" ] ; then
- usage
- else
- DIST="${1}"
- fi
- fi
-fi
-if [ "${AUTOCONFIG}" == "0" ] ; then
- if [ "${2}" == "" ] ; then
- PREFIX="-SP4"
- LPREFIX="-sp4"
- else
- PREFIX="${2}"
- LPREFIX=`echo ${2} | awk '{print tolower($1)}'`
- fi
-fi
-SYSARCH=`uname -m`
-
-if [ "${SYSARCH}" == "x86_64" ] ; then
- ARCH="x86_64"
- SUFFIX="-64"
-else
- ARCH="i586"
- SUFFIX=""
-fi
-
-BASEDIST="${BASEURL}${LDIST}${VERSION}/${DIST}${VERSION}${SUFFIX}${PREFIX}/;${DIST}${VERSION}${SUFFIX}${PREFIX}"
-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"
-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
- BASEUPDATESP1=`echo "${BASEUPDATE}" | sed -e s@"-SP2"@"-SP1"@g | sed -e s@"-sp2"@"-sp1"@g`
- SDKUPDATESP1=`echo "${SDKUPDATE}" | sed -e s@"-SP2"@"-SP1"@g | sed -e s@"-sp2"@"-sp1"@g`
-else
- BASEUPDATESP1=""
- SDKUPDATESP1=""
-fi
-
-# 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}'`
- zypper ar -f ${REPO} ${REPOALIAS}
-
-done
|
[-]
[+]
|
Added |
root.tar.bz2/root
^
|
+(directory)
|
[-]
[+]
|
Added |
root.tar.bz2/root/add_sle_repos.sh
^
|
@@ -0,0 +1,138 @@
+#!/bin/bash
+# add sles repos script
+# Author: Carsten Schoene
+# $$LastChangedDate: 2015-07-20 17:05:20 +0200 (Mo, 20. Jul 2015) $
+# $Rev: 10403 $
+#
+BASEURL="http://sles.internetx.de/suse/"
+SRELFILE="/etc/SuSE-release"
+AUTOCNFIG="0"
+
+function usage {
+ echo "Usage: $0 [ SLES | SLED ]"
+ exit 1
+}
+
+if [ -f ${SRELFILE} ] ; then
+ # get distribution type
+ if [ -n "`grep -i server ${SRELFILE}`" ] ; then
+ DIST="SLES"
+ LDIST="sles"
+ elif [ -n "`grep -i desktop ${SRELFILE}`" ] ; then
+ DIST="SLED"
+ LDIST="sled"
+ else
+ echo "Unsupported SuSE distribution"
+ exit 1
+ fi
+
+ # get version
+ if [ -n "`grep -i ^version ${SRELFILE}`" ] ; then
+ VERSION=`cat ${SRELFILE} |grep -E '(^VERSION)' |sed -e s@" "@""@g|awk -F= '{print $2}'`
+ else
+ echo "Unsupported SuSE distribution"
+ exit 2
+ fi
+ # get patchlevel
+ if [ -n "`grep -i ^patchlevel ${SRELFILE}`" ] ; then
+ PATCHLEVEL=`cat ${SRELFILE} |grep -E '(^PATCHLEVEL)' |sed -e s@" "@""@g|awk -F= '{print $2}'`
+ else
+ PATCHLEVEL="GA"
+ fi
+
+ if [ "${VERSION}" == "11" ] ; then
+ if [ "${PATCHLEVEL}" == "GA" ] ; then
+ PREFIX=""
+ LPREFIX=""
+ AUTOCONFIG="1"
+ elif [ "${PATCHLEVEL}" == "1" ] ; then
+ PREFIX="-SP1"
+ LPREFIX="-sp1"
+ AUTOCONFIG="1"
+ elif [ "${PATCHLEVEL}" == "2" ] ; then
+ 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
+ fi
+ else
+ echo "Unsupported SuSE distribution"
+ exit 4
+ fi
+fi
+
+if [ "${AUTOCONFIG}" == "0" ] ; then
+ if [ "${1}" == "" ] ; then
+ DIST="SLES"
+ else
+ if [ "${1}" != "SLES" ] || [ "${1}" != "SLED" ] ; then
+ usage
+ else
+ DIST="${1}"
+ fi
+ fi
+fi
+if [ "${AUTOCONFIG}" == "0" ] ; then
+ if [ "${2}" == "" ] ; then
+ PREFIX="-SP4"
+ LPREFIX="-sp4"
+ else
+ PREFIX="${2}"
+ LPREFIX=`echo ${2} | awk '{print tolower($1)}'`
+ fi
+fi
+SYSARCH=`uname -m`
+
+if [ "${SYSARCH}" == "x86_64" ] ; then
+ ARCH="x86_64"
+ SUFFIX="-64"
+else
+ ARCH="i586"
+ SUFFIX=""
+fi
+
+BASEDIST="${BASEURL}${LDIST}${VERSION}/${DIST}${VERSION}${SUFFIX}${PREFIX}/;${DIST}${VERSION}${SUFFIX}${PREFIX}"
+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"
+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
+ BASEUPDATESP1=`echo "${BASEUPDATE}" | sed -e s@"-SP2"@"-SP1"@g | sed -e s@"-sp2"@"-sp1"@g`
+ SDKUPDATESP1=`echo "${SDKUPDATE}" | sed -e s@"-SP2"@"-SP1"@g | sed -e s@"-sp2"@"-sp1"@g`
+else
+ BASEUPDATESP1=""
+ SDKUPDATESP1=""
+fi
+
+# 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}'`
+ zypper -n ar -f ${REPO} ${REPOALIAS}
+
+done
|