Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- CONFFILE="/local/etc/fetchextras.conf" # can be overridden
- TARGETDIR="/tmp/repodl"
- read_config() {
- [[ -r $CONFFILE ]] || { echo "Can't read $CONFFILE, giving up..."; exit 1; }
- while read type value
- do
- [[ "$type" = "repo" ]] && ENABLE="--enablerepo $value $ENABLE"
- [[ "$type" = "package" ]] && PKGS="$value $PKGS"
- done < $CONFFILE
- }
- fetch_packages() {
- for pkg in $PKGS
- do
- yumdownloader -q -y --destdir=$TARGETDIR --disablerepo=* --resolve $ENABLE $pkg
- done
- }
- get_options() {
- CONFFILE=${1:-$CONFFILE}
- }
- get_options $@
- read_config
- fetch_packages
- repo epel
- package whatever
- spacecmd {SSM:2}> repo_listfilters epel-6-64
- spacecmd {SSM:2}> repo_addfilters epel-6-64 '+tomcat'
- spacecmd {SSM:2}> repo_listfilters epel-6-64
- +tomcat
- spacecmd {SSM:2}> repo_clearfilters epel-6-64
- spacecmd {SSM:2}> repo_listfilters epel-6-64
- spacecmd {SSM:2}>
- cobbler repo edit --name epel-6-64 --rpm-list 'tomcat'
Add Comment
Please, Sign In to add comment