From: Alan Jack Pippin Date: Sun, 13 Nov 2005 21:37:16 +0000 (-0700) Subject: Used Carl's super-cool shell script shorthand to source system config file. X-Git-Tag: release-0.4~17 X-Git-Url: http://git.pippins.net/embedvideo/static/images/%7Bdone_action%7D?a=commitdiff_plain;h=e35d13e79fa992e58c1599e9304f16d0d34ba66b;p=backups%2F.git Used Carl's super-cool shell script shorthand to source system config file. --- diff --git a/scripts/burn-imgs.sh b/scripts/burn-imgs.sh index f33ea99..bffc5e9 100755 --- a/scripts/burn-imgs.sh +++ b/scripts/burn-imgs.sh @@ -8,10 +8,7 @@ cronstopstart="/etc/init.d/cron" . config.sh # source the system specific configuration -if [ -f /etc/lsbackups.conf ] -then - . /etc/lsbackups.conf -fi +[ -f /etc/lsbackups.conf ] && . /etc/lsbackups.conf # If the noburn file is there then don't burn. [ -f "$noburnfile" ] && exit 0 diff --git a/scripts/cron-burn.sh b/scripts/cron-burn.sh index f2ca414..4fe9a0b 100755 --- a/scripts/cron-burn.sh +++ b/scripts/cron-burn.sh @@ -6,10 +6,7 @@ export PATH=$(dirname $0):/bin:/usr/bin:/sbin . config.sh # source the system specific configuration -if [ -f /etc/lsbackups.conf ] -then - . /etc/lsbackups.conf -fi +[ -f /etc/lsbackups.conf ] && . /etc/lsbackups.conf # burn-imgs.sh needs to be detached so that it can stop and start cron without # dying itself. diff --git a/scripts/cron-pack.sh b/scripts/cron-pack.sh index 62c65ad..1594d68 100755 --- a/scripts/cron-pack.sh +++ b/scripts/cron-pack.sh @@ -6,10 +6,7 @@ export PATH=$(dirname $0):/bin:/usr/bin:/sbin . config.sh # source the system specific configuration -if [ -f /etc/lsbackups.conf ] -then - . /etc/lsbackups.conf -fi +[ -f /etc/lsbackups.conf ] && . /etc/lsbackups.conf if [ -n "$(find $lastbackupfile -mtime +14)" -o -n "$(cat $statusfile | grep -i incomplete)" ]; then echo "Running backups from cron..." diff --git a/scripts/eject-disk.sh b/scripts/eject-disk.sh index ca2795c..811a456 100755 --- a/scripts/eject-disk.sh +++ b/scripts/eject-disk.sh @@ -6,10 +6,7 @@ export PATH=$(dirname $0):/bin:/usr/bin:/sbin . config.sh # source the system specific configuration -if [ -f /etc/lsbackups.conf ] -then - . /etc/lsbackups.conf -fi +[ -f /etc/lsbackups.conf ] && . /etc/lsbackups.conf eject $dev diff --git a/scripts/pack-image.sh b/scripts/pack-image.sh index f2aae3e..b6557f6 100755 --- a/scripts/pack-image.sh +++ b/scripts/pack-image.sh @@ -8,10 +8,7 @@ export PATH=$scriptsdir:/bin:/usr/bin:/sbin:/usr/sbin . config.sh # source the system specific configuration -if [ -f /etc/lsbackups.conf ] -then - . /etc/lsbackups.conf -fi +[ -f /etc/lsbackups.conf ] && . /etc/lsbackups.conf # file locations and other values today=$(date +%Y%m%d%H%M%S)