More error checking

master
bbruns 2010-08-25 17:56:18 +00:00
parent 9c7b5c6950
commit fb8f8d11e0
1 changed files with 16 additions and 1 deletions

View File

@ -26,8 +26,23 @@ BASEDIR=/etc/firewall-sosdg
TWEAKS=$BASEDIR/tweaks
if [ ! -r $BASEDIR/include/static ] || [ ! -r $BASEDIR/include/functions ]; then
echo "Error: Missing either include/static or include/functions. These are critical to operation"
echo "of this script. Please make sure they are readable and exist!"
exit 1
fi
. $BASEDIR/include/static
. $BASEDIR/options
if [ -r $BASEDIR/options ]; then
. $BASEDIR/options
else
echo -e "${RED}Error: Can not load options file. Did you forget to rename options.default?"
exit 1
fi
. $BASEDIR/include/functions
while [ $# -gt 0 ]; do