[QUOTE=peter1292;27578]Thanks Mike!
I couldn’t get any of the servers to update without putting them into testing and then production repositories. The manual says you don’t have to, but I cannot get it to work without.
The CLI is also how I administrate the SMT servers, so it is great to have someone else who can help me with the information as the manual can be lacking for CLI…
[/QUOTE]
I don’t do that much with SMT really. I set it up, it runs. I think the only interactions I’ve done with it this year is to switch it to using suse.com instead of novell.com and enabling mirroring the SLE 12 repos.
[QUOTE=peter1292;27578]
With regards to the cron job, that is a fantastic idea! I may have to add that into ours :)[/QUOTE]
FWIW, below are the scripts I use. smtjobs_getupdates runs nightly. smtjobs_makeproductionrepos runs weekly, unless I intervene for some reason. I don’t offer any guarantee of fitness for purpose, but they were last modified about four years ago so they can’t be too bad.
[CODE]foo:~ # cat /usr/local/sbin/smtjobs_getupdates
#!/bin/bash
echo “Starting at $(date)”;
source /usr/local/etc/smtjobs_functions;
smt-sync;
smt-mirror;
cmd_on_all_repos “smt staging allow --all”;
cmd_on_all_repos “smt-staging status”;
cmd_on_all_repos “smt-staging createrepo” “–testing”;
echo “Finished at $(date)”;
foo:~ # cat /usr/local/sbin/smtjobs_makeproductionrepos
#!/bin/bash
echo “Starting at $(date)”;
source /usr/local/etc/smtjobs_functions;
cmd_on_all_repos “smt-staging createrepo” “–production”;
echo “Finished at $(date)”;
foo:~ # cat /usr/local/etc/smtjobs_functions
runs command passed as $1 on all enabled repos except -Pool and -Core nvidia
ones since you can’t run the staging commands on those
function cmd_on_all_repos () {
smt-repos --only-enabled | grep SLE | grep -v – -Pool | grep -v – -Core | grep -vi nvidia | cut -d ‘|’ -f 5,6 --output-delimiter=’ ’ | sed ‘s/ \(sle\)/ \1/’ | while read repo;do
echo “Running $1 $2 on $repo …”;
echo -e "
";
done
echo -e "
=====================================================
";
}
foo:~ #[/CODE]