From d83d76f825d0222508d82182224c994885ed4f0c Mon Sep 17 00:00:00 2001 From: ggruner Date: Fri, 26 Apr 2013 12:46:04 +0300 Subject: [PATCH 1/2] Bug fix - Find latest RHEL5 Kickstart path Changed the behaviour how to find latest kickstart tree path, it affects mainly RHEL5. With the introduction of RHEL5.7 the name of the kickstart tree directory changed from "ks-rhel-x86_64-server-5-u6" to "ks-rhel-x86_64-server-5-5.7". --- clone_create_ks_distributions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clone_create_ks_distributions.sh b/clone_create_ks_distributions.sh index b036ba4..2958da5 100755 --- a/clone_create_ks_distributions.sh +++ b/clone_create_ks_distributions.sh @@ -67,7 +67,7 @@ then else echo "No release version passed, trying to find latest kickstart tree path" KSPATH=$(find /var/satellite/rhn/kickstart/ -name \ - ks-rhel-${ARCH}-server-${RHELVERSION}* | sort -n | tail -n1) + ks-rhel-${ARCH}-server-${RHELVERSION}-${RHELVERSION}* | sort -n | tail -n1) fi echo_debug "spacecmd -- distribution_create -n ${CLONECH} -p ${KSPATH} \ -b ${CLONECH} -t rhel_${RHELVERSION}" From 6d9b4ac7b969d5d02c490e762e47e91ca707af19 Mon Sep 17 00:00:00 2001 From: ggruner Date: Mon, 29 Apr 2013 17:51:30 +0300 Subject: [PATCH 2/2] Bug fix - common functions are sourced too early The common functions are sourced too early. This leads that (KSPREFIX, AKPREFIX, CCPREFIX and CHANNEL_Prefix) are set wrong, when you like to Clone RHEL5 and not the default RHEL6. --- clone_release_from_rhel_release.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clone_release_from_rhel_release.sh b/clone_release_from_rhel_release.sh index ec3e1c1..ad06145 100755 --- a/clone_release_from_rhel_release.sh +++ b/clone_release_from_rhel_release.sh @@ -52,9 +52,6 @@ exit_usage() exit 1 } -# Source some common function definitions -. common_functions.sh - if [ $# -lt 1 ] then exit_usage @@ -63,6 +60,9 @@ fi RHELVERSION=$(echo $1 | cut -d. -f1) UPDATE=$(echo $1 | cut -d. -f2) +# Source some common function definitions +. common_functions.sh + # Base channel naming: # rhel-x86_64-server-5 # |- rhel-x86_64-server-supplementary-5