Prepended all log names with 'sysupd'.
Added stanza to support RedHat YUM updating.
1 parent 93196e3 commit c1bd171eeb050a2d4aea2c4be6a8df6ff13af591
@tundra tundra authored on 29 Mar 2013
Showing 1 changed file
View
23
sysupd
#!/bin/sh
# Update Various System Files, Ports, etc.
# Copyright (c) 2006-2013, TundraWare Inc, Des Plaines, IL USA
# All Rights Reserved
# $Id: sysupd,v 1.139 2013/03/26 17:24:54 tundra Exp $
# $Id: sysupd,v 1.140 2013/03/29 19:08:58 tundra Exp $
 
 
#####
# Where To Put The Various Log Files Generated Here
#####
# List Of Sets To Process By Default
#####
 
#ALL='debian freebsd_doc freebsd_ports freebsd_src texlive'
#ALL='debian freebsd_doc freebsd_ports freebsd_src redhat texlive'
 
# !!!
# !!! Uncomment and edit this or the script will do nothing with CLI args
# !!! Edit this or the program will do nothing without CLI args
#
#DEFAULTSETS='freebsd_doc freebsd_ports freebsd_src texlive'
 
DEFAULTSETS=''
 
 
# ---------------- Support Functions ---------------- #
 
#####
 
runupd()
{
log=$2/$1.log
log=$2/sysupd-$1.log
timestamp $log
touch $2/.$1-begin && eval $3 >>$log 2>&1 && touch $2/.$1-end &
}
 
;;
 
 
###
# RedHat YUM Updates
###
 
redhat)
runupd $SET $LOGDIR "/usr/bin/yum -y upgrade"
;;
 
###
# TeX Live Updates
###
 
texlive)
runupd $SET $LOGDIR "/usr/local/bin/tlmgr update --self && /usr/local/bin/tlmgr update --all"
;;
 
#####
#####
# Catch Errors
#####
 
*)