diff --git a/README.md b/README.md index c52b057..70b39ff 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,10 @@ spacewalk_scripts ================= -Repo for spacewalk scripts +Simple script that automates updating xml files from http://cefs.steve-meier.de/ and updates security errata for all channels you configured. + +For it to work you have to: +- point SCRIPT_PATH to folder in which you have errata-import.pl script from http://cefs.steve-meier.de/ +- point CFG_FILE to file in which you have set your spacewalk creds +- have a working spacewalk server :) + diff --git a/centos-errata-update.sh b/centos-errata-update.sh index ca24b94..9711b98 100755 --- a/centos-errata-update.sh +++ b/centos-errata-update.sh @@ -1,8 +1,10 @@ #spacewalk address SPACEWALK=127.0.0.1 - +# set path to errata-import.pl script from http://cefs.steve-meier.de/ +SCRIPT_PATH= +CFG_FILE=/etc/ya-errata-import.cfg # source username and password for spacewalk -. /etc/ya-errata-import.cfg +. $CFG_FILE #export SPACEWALK_USER= #export SPACEWALK_PASS= @@ -12,11 +14,11 @@ SPACEWALK=127.0.0.1 # update to te latest errata -cd /opt/ya-errata-import +cd $SCRIPT_PATH wget -N http://cefs.steve-meier.de/errata.latest.xml -ERRATA=/opt/ya-errata-import/errata.latest.xml +ERRATA=$SCRIPT_PATH/errata.latest.xml # update errata for channels (all channels could be in one line separated with commas but if you have many chans its more transparent this way -/opt/ya-errata-import/errata-import.pl --errata=$ERRATA_XML --server $SPACEWALK --publish --debug --security --include-channels -/opt/ya-errata-import/errata-import.pl --errata=$ERRATA_XML --server $SPACEWALK --publish --debug --security --include-channels \ No newline at end of file +$SCRIPT_PATH/errata-import.pl --errata=$ERRATA_XML --server $SPACEWALK --publish --debug --security --include-channels +$SCRIPT_PATH/errata-import.pl --errata=$ERRATA_XML --server $SPACEWALK --publish --debug --security --include-channels \ No newline at end of file