From e35d13e79fa992e58c1599e9304f16d0d34ba66b Mon Sep 17 00:00:00 2001 From: Alan Jack Pippin Date: Sun, 13 Nov 2005 14:37:16 -0700 Subject: [PATCH] Used Carl's super-cool shell script shorthand to source system config file. --- scripts/burn-imgs.sh | 5 +---- scripts/cron-burn.sh | 5 +---- scripts/cron-pack.sh | 5 +---- scripts/eject-disk.sh | 5 +---- scripts/pack-image.sh | 5 +---- 5 files changed, 5 insertions(+), 20 deletions(-) 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) -- 2.34.1