echo "Using snippet $tweak_grub_snippet"
$SNIPPET($tweak_grub_snippet)
+#set $clear_repos_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.100.clear_repos.sh"
+echo
+echo "Using snippet $clear_repos_snippet"
+$SNIPPET($clear_repos_snippet)
+
%end
--- /dev/null
+## !/bin/bash
+#raw
+
+#-----------------------------------------------------------
+clear_all_repo_files() {
+
+ echo
+ echo "${HASH_LINE}"
+ echo
+ log "Cleaning all exiting repo files ..."
+
+ local repo_dir="/etc/yum.repos.d"
+ local old_dir="${repo_dir}/.old"
+ local repo_file=
+ local bname=
+
+ mkdir -pv "${old_dir}"
+
+ for repo_file in "${repo_dir}"/*.repo ; do
+ if [[ ! -f "${repo_file}" ]] ; then
+ continue
+ fi
+ bname=$( echo "${repo_file}" | basename )
+ echo " - ${bname}"
+ cp -pv "${repo_file}" "${old_dir}"
+ cp -v /dev/null "${repo_file}"
+ done
+
+}
+clear_all_repo_files
+
+#end raw
+## vim: ts=4 et list