I've updated the yumcheck.sh script to create a single monolithic yum command, then run the indicated yum command only once.
That is:
* The old version ran the yum command for each custom repo -- which would list updates available from the standard repos over and over, and which took longer than necessary.
* The new version saves all the specific repo "enablepkgs" directives, then runs yum only once
For example, here is the output of the new version on my system - showing the extra arguments generated for each repo, then showing the final, single yum command and its results (I currently have a reboot pending):
yumcheck.sh check-update
===
--enablerepo=centos-sclo-rh --setopt="centos-sclo-rh.includepkgs=mysql55.x86_64,mysql55-mysql.x86_64,mysql55-mysql-libs.x86_64,mysql55-mysql-server.x86_64,mysql55-runtime.x86_64"
===
===
--enablerepo=epel --setopt="epel.includepkgs=fail2ban.noarch,ghc-HTTP.x86_64,ghc-array.x86_64,ghc-base.x86_64,ghc-base64-bytestring.x86_64,ghc-binary.x86_64,ghc-blaze-builder.x86_64,ghc-blaze-html.x86_64,ghc-bytestring.x86_64,ghc-citeproc-hs.x86_64,ghc-containers.x86_64,ghc-deepseq.x86_64,ghc-digest.x86_64,ghc-directory.x86_64,ghc-extensible-exceptions.x86_64,ghc-filepath.x86_64,ghc-highlighting-kate.x86_64,ghc-json.x86_64,ghc-mtl.x86_64,ghc-network.x86_64,ghc-old-locale.x86_64,ghc-old-time.x86_64,ghc-pandoc-types.x86_64,ghc-parsec.x86_64,ghc-pcre-light.x86_64,ghc-pretty.x86_64,ghc-process.x86_64,ghc-random.x86_64,ghc-syb.x86_64,ghc-tagsoup.x86_64,ghc-temporary.x86_64,ghc-texmath.x86_64,ghc-text.x86_64,ghc-time.x86_64,ghc-transformers.x86_64,ghc-unix.x86_64,ghc-utf8-string.x86_64,ghc-xml.x86_64,ghc-zip-archive.x86_64,ghc-zlib.x86_64,gnustep-filesystem.x86_64,gnustep-make.x86_64,gyp.noarch,http-parser.x86_64,http-parser-devel.x86_64,jemalloc.x86_64,libuv.x86_64,libuv-devel.x86_64,node-gyp.noarch,nodejs.x86_64,nodejs-abbrev.noarch,nodejs-ansi.noarch,nodejs-archy.noarch,nodejs-asn1.noarch,nodejs-assert-plus.noarch,nodejs-async.noarch,nodejs-aws-sign.noarch,nodejs-block-stream.noarch,nodejs-boom.noarch,nodejs-child-process-close.noarch,nodejs-chmodr.noarch,nodejs-chownr.noarch,nodejs-cmd-shim.noarch,nodejs-combined-stream.noarch,nodejs-config-chain.noarch,nodejs-cookie-jar.noarch,nodejs-cryptiles.noarch,nodejs-ctype.noarch,nodejs-delayed-stream.noarch,nodejs-devel.x86_64,nodejs-editor.noarch,nodejs-forever-agent.noarch,nodejs-form-data.noarch,nodejs-fstream.noarch,nodejs-fstream-ignore.noarch,nodejs-fstream-npm.noarch,nodejs-github-url-from-git.noarch,nodejs-glob.noarch,nodejs-graceful-fs.noarch,nodejs-hawk.noarch,nodejs-hoek.noarch,nodejs-http-signature.noarch,nodejs-inherits.noarch,nodejs-ini.noarch,nodejs-init-package-json.noarch,nodejs-json-stringify-safe.noarch,nodejs-lockfile.noarch,nodejs-lru-cache.noarch,nodejs-mime.noarch,nodejs-minimatch.noarch,nodejs-mkdirp.noarch,nodejs-mute-stream.noarch,nodejs-node-uuid.noarch,nodejs-nopt.noarch,nodejs-npm-registry-client.noarch,nodejs-npm-user-validate.noarch,nodejs-npmconf.noarch,nodejs-npmlog.noarch,nodejs-oauth-sign.noarch,nodejs-once.noarch,nodejs-opener.noarch,nodejs-osenv.noarch,nodejs-packaging.noarch,nodejs-promzard.noarch,nodejs-proto-list.noarch,nodejs-qs.noarch,nodejs-read.noarch,nodejs-read-installed.noarch,nodejs-read-package-json.noarch,nodejs-request.noarch,nodejs-retry.noarch,nodejs-rimraf.noarch,nodejs-semver.noarch,nodejs-sha.noarch,nodejs-sigmund.noarch,nodejs-slide.noarch,nodejs-sntp.noarch,nodejs-tar.noarch,nodejs-tunnel-agent.noarch,nodejs-uid-number.noarch,nodejs-which.noarch,npm.noarch,pandoc.x86_64,perl-File-Tail.noarch,python-inotify.noarch,redis.x86_64,v8.x86_64,v8-devel.x86_64"
===
===
--enablerepo=fws --setopt="fws.includepkgs=smeserver-fail2ban.noarch"
===
===
--enablerepo=smecontribs --setopt="smecontribs.includepkgs=ddclient.noarch,fping.x86_64,hddtemp.x86_64,perl-rrdtool.x86_64,rrdtool.x86_64,smeserver-dovecot-extras.noarch,smeserver-lazy_admin_tools.noarch,smeserver-mysql55.noarch,smeserver-sme9admin.noarch"
===
===
--enablerepo=sogo3 --setopt="sogo3.includepkgs=gnustep-base.x86_64,libmemcached.x86_64,libwbxml.x86_64,sogo.x86_64,sogo-activesync.x86_64,sogo-ealarms-notify.x86_64,sogo-tool.x86_64,sope49-appserver.x86_64,sope49-cards.x86_64,sope49-core.x86_64,sope49-gdl1.x86_64,sope49-gdl1-contentstore.x86_64,sope49-gdl1-mysql.x86_64,sope49-ldap.x86_64,sope49-mime.x86_64,sope49-sbjson.x86_64,sope49-xml.x86_64"
===
===
--enablerepo=stephdl --setopt="stephdl.includepkgs=sarg.x86_64,smeserver-sarg.noarch,smeserver-sogo.noarch"
===
===
--enablerepo=/wazuh-agent-2.0.1-1.rhel6.x86_64 --setopt="/wazuh-agent-2.0.1-1.rhel6.x86_64.includepkgs=wazuh-agent.x86_64"
===
===
yum check-update --enablerepo=centos-sclo-rh --setopt=centos-sclo-rh.includepkgs=mysql55.x86_64,mysql55-mysql.x86_64,mysql55-mysql-libs.x86_64,mysql55-mysql-server.x86_64,mysql55-runtime.x86_64 --enablerepo=epel --setopt=epel.includepkgs=fail2ban.noarch,ghc-HTTP.x86_64,ghc-array.x86_64,ghc-base.x86_64,ghc-base64-bytestring.x86_64,ghc-binary.x86_64,ghc-blaze-builder.x86_64,ghc-blaze-html.x86_64,ghc-bytestring.x86_64,ghc-citeproc-hs.x86_64,ghc-containers.x86_64,ghc-deepseq.x86_64,ghc-digest.x86_64,ghc-directory.x86_64,ghc-extensible-exceptions.x86_64,ghc-filepath.x86_64,ghc-highlighting-kate.x86_64,ghc-json.x86_64,ghc-mtl.x86_64,ghc-network.x86_64,ghc-old-locale.x86_64,ghc-old-time.x86_64,ghc-pandoc-types.x86_64,ghc-parsec.x86_64,ghc-pcre-light.x86_64,ghc-pretty.x86_64,ghc-process.x86_64,ghc-random.x86_64,ghc-syb.x86_64,ghc-tagsoup.x86_64,ghc-temporary.x86_64,ghc-texmath.x86_64,ghc-text.x86_64,ghc-time.x86_64,ghc-transformers.x86_64,ghc-unix.x86_64,ghc-utf8-string.x86_64,ghc-xml.x86_64,ghc-zip-archive.x86_64,ghc-zlib.x86_64,gnustep-filesystem.x86_64,gnustep-make.x86_64,gyp.noarch,http-parser.x86_64,http-parser-devel.x86_64,jemalloc.x86_64,libuv.x86_64,libuv-devel.x86_64,node-gyp.noarch,nodejs.x86_64,nodejs-abbrev.noarch,nodejs-ansi.noarch,nodejs-archy.noarch,nodejs-asn1.noarch,nodejs-assert-plus.noarch,nodejs-async.noarch,nodejs-aws-sign.noarch,nodejs-block-stream.noarch,nodejs-boom.noarch,nodejs-child-process-close.noarch,nodejs-chmodr.noarch,nodejs-chownr.noarch,nodejs-cmd-shim.noarch,nodejs-combined-stream.noarch,nodejs-config-chain.noarch,nodejs-cookie-jar.noarch,nodejs-cryptiles.noarch,nodejs-ctype.noarch,nodejs-delayed-stream.noarch,nodejs-devel.x86_64,nodejs-editor.noarch,nodejs-forever-agent.noarch,nodejs-form-data.noarch,nodejs-fstream.noarch,nodejs-fstream-ignore.noarch,nodejs-fstream-npm.noarch,nodejs-github-url-from-git.noarch,nodejs-glob.noarch,nodejs-graceful-fs.noarch,nodejs-hawk.noarch,nodejs-hoek.noarch,nodejs-http-signature.noarch,nodejs-inherits.noarch,nodejs-ini.noarch,nodejs-init-package-json.noarch,nodejs-json-stringify-safe.noarch,nodejs-lockfile.noarch,nodejs-lru-cache.noarch,nodejs-mime.noarch,nodejs-minimatch.noarch,nodejs-mkdirp.noarch,nodejs-mute-stream.noarch,nodejs-node-uuid.noarch,nodejs-nopt.noarch,nodejs-npm-registry-client.noarch,nodejs-npm-user-validate.noarch,nodejs-npmconf.noarch,nodejs-npmlog.noarch,nodejs-oauth-sign.noarch,nodejs-once.noarch,nodejs-opener.noarch,nodejs-osenv.noarch,nodejs-packaging.noarch,nodejs-promzard.noarch,nodejs-proto-list.noarch,nodejs-qs.noarch,nodejs-read.noarch,nodejs-read-installed.noarch,nodejs-read-package-json.noarch,nodejs-request.noarch,nodejs-retry.noarch,nodejs-rimraf.noarch,nodejs-semver.noarch,nodejs-sha.noarch,nodejs-sigmund.noarch,nodejs-slide.noarch,nodejs-sntp.noarch,nodejs-tar.noarch,nodejs-tunnel-agent.noarch,nodejs-uid-number.noarch,nodejs-which.noarch,npm.noarch,pandoc.x86_64,perl-File-Tail.noarch,python-inotify.noarch,redis.x86_64,v8.x86_64,v8-devel.x86_64 --enablerepo=fws --setopt=fws.includepkgs=smeserver-fail2ban.noarch --enablerepo=smecontribs --setopt=smecontribs.includepkgs=ddclient.noarch,fping.x86_64,hddtemp.x86_64,perl-rrdtool.x86_64,rrdtool.x86_64,smeserver-dovecot-extras.noarch,smeserver-lazy_admin_tools.noarch,smeserver-mysql55.noarch,smeserver-sme9admin.noarch --enablerepo=sogo3 --setopt=sogo3.includepkgs=gnustep-base.x86_64,libmemcached.x86_64,libwbxml.x86_64,sogo.x86_64,sogo-activesync.x86_64,sogo-ealarms-notify.x86_64,sogo-tool.x86_64,sope49-appserver.x86_64,sope49-cards.x86_64,sope49-core.x86_64,sope49-gdl1.x86_64,sope49-gdl1-contentstore.x86_64,sope49-gdl1-mysql.x86_64,sope49-ldap.x86_64,sope49-mime.x86_64,sope49-sbjson.x86_64,sope49-xml.x86_64 --enablerepo=stephdl --setopt=stephdl.includepkgs=sarg.x86_64,smeserver-sarg.noarch,smeserver-sogo.noarch
===
Loaded plugins: fastestmirror, smeserver
Loading mirror speeds from cached hostfile
* base: mirrors.ocf.berkeley.edu
* epel: fedora-epel.mirrors.tds.net
* smeaddons: www.mirrorservice.org
* smecontribs: smeserver.mirror.garr.it
* smeextras: www.mirrorservice.org
* smeos: www.mirrorservice.org
* smeupdates: www.mirrorservice.org
* updates: repo1.ash.innoscale.net
===
Locally installed package(s) exist.
You need to manage updates for these packages manually:
wazuh-agent.x86_64
(You would also get this message if you have created a
yum repository whose name begins with a forward slash)
===
A contrib has set the UnsavedChanges flag to 'yes'
You should execute the following commands to complete the update:
signal-event post-upgrade; signal-event reboot