Hi! Its not a beauty, but I do that via remote commands:
SOLLZEIT=0415 UHRZEIT=`date +%H%M` MAXUHRZEIT=`date -d "${SOLLZEIT} + 2 minutes" +'%H%M'` if [ ${UHRZEIT} -ge ${SOLLZEIT} ] && [ ${UHRZEIT} -le ${MAXUHRZEIT} ]; then logger -p local0.info -t SPACEWALK Starting yum update via system_runscript if [ "$(ls -A /etc/yum.repos.d/)" ]; then logger -p local0.info -t SPACEWALK Emptying /etc/yum.repos.d rm -rf /etc/yum.repos.d/* fi logger -p local0.info -t SPACEWALK UPDATING via system_runscript STARTYUM=`date +%s` yum -y update if [ $? -ne 0 ]; then echo "FEHLER IM YUM" logger -p local0.crit -t SPACEWALK XALERTX ERROR WITH YUM UPDATE exit 1 fi ENDEYUM=`date +%s` SLEEPTIME=$(( (3600 - (${ENDEYUM} - ${STARTYUM})) - ((10#${UHRZEIT} - 10#${SOLLZEIT}) * 60) )) logger -p local0.info -t SPACEWALK UPDATE ENDS via system_runscript logger -p local0.info -t SPACEWALK waiting for reboot \(sleep $SLEEPTIME\) sleep ${SLEEPTIME} logger -p local0.info -t SPACEWALK rebooting reboot else logger -p local0.crit -t SPACEWALK XALERTX OUT OF TIMERANGE XALERTX exit -1 fi Von: Steve Ensley <steve.ens...@gmail.com> An: spacewalk-list@redhat.com Datum: 15.05.2017 21:22 Betreff: [Spacewalk-list] Conditional reboot after patching Gesendet von: spacewalk-list-boun...@redhat.com Whats a good way to batch schedule patching followed by a reboot if all the patches in the schedule were successfull. This is actually to be done in SuseManager but any spacewalk method should be adaptable. -- Steve Ensley _______________________________________________ Spacewalk-list mailing list Spacewalk-list@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-list Persönlich haftende Gesellschafter: Harald Illy, Michael Klaus, Friedrich von Metzler, Emmerich Müller, Dr. Johannes J. Reich, Gerhard Wiesheu Vorsitzender des Aufsichtsrates: Dr. Christoph Schücking Sitz der Gesellschaft: Frankfurt am Main, Handelsregisternummer: HRB 27 515 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfänger sein, so bitten wir Sie höflich, dies unverzüglich dem Absender mitzuteilen und die Nachricht zu löschen. Es ist unzulässig, die Nachricht unbefugt weiterzuleiten oder zu kopieren. Da wir nicht die Echtheit oder Vollständigkeit der in dieser Nachricht enthaltenen Informationen garantieren oder zusichern können, sind die vorstehenden Ausführungen rechtlich nicht bindend. Eine Haftung hierfür wird ausgeschlossen. This message is confidential. If you are not the intended recipient, we kindly ask you to inform the sender and delete the information. Any unauthorised dissemination or copying hereof is prohibited. As we cannot guarantee or assure the genuineness or completeness of the information contained in this message, the statements set forth above are not legally binding. Accordingly we cannot accept any liability for their contents.
PGP.sig
Description: PGP signature
_______________________________________________ Spacewalk-list mailing list Spacewalk-list@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-list