Skip to content

Instantly share code, notes, and snippets.

@skreuzer
Created June 29, 2010 15:18
Show Gist options
  • Save skreuzer/457355 to your computer and use it in GitHub Desktop.
Save skreuzer/457355 to your computer and use it in GitHub Desktop.
#!/bin/sh
#
# $FreeBSD$
#
# If there is a global system configuration file, suck it in.
#
if [ -r /etc/defaults/periodic.conf ]
then
. /etc/defaults/periodic.conf
source_periodic_confs
fi
case "$daily_csup_enable" in
[Yy][Ee][Ss])
if [ -z "$daily_csup_supfile" ]
then
echo '$daily_csup_enable is set but' \
'$daily_csup_supfile is not'
rc=2
else
if [ -z "$daily_csup_binary" ]
then
daily_csup_binary=/usr/bin/csup
fi
if [ ! -x "$daily_csup_binary" ]
then
echo '$daily_csup_binary is set but ' \
$daily_csup_binary 'is not executable'
rc=2
else
out=`$daily_csup_binary $daily_csup_supfile`
rc=$?
echo "$out"
fi
fi;;
*) rc=0;;
esac
exit $rc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment