diff -Naur sbopkg/src/usr/bin/sbopkg sbopkg-hba/src/usr/bin/sbopkg --- sbopkg/src/usr/bin/sbopkg 2008-03-29 15:19:51.000000000 -0600 +++ sbopkg-hba/src/usr/bin/sbopkg 2008-03-29 15:20:15.000000000 -0600 @@ -35,13 +35,26 @@ VER=0.0.4 sanity_checks () { -# Check if config file is there and if yes, set some variables +# Check if config file is there and if so, +# check that it has all needed variables +# with any value, and set them. if [ ! -e $SBOPKG_CONF ]; then echo "$SCRIPT: No $SBOPKG_CONF file was found." echo "Please create it and run $SCRIPT again." 1>&2 exit 1 else + for i in RSYNCMIRROR SLACKVER LOCALREPO SRCDIR TMP KEEPLOG + do + grep "^$i=.\{1,\}" "$SBOPKG_CONF" > /dev/null + if [ "$?" != 0 ]; then + echo "$SCRIPT: Can't find variable $i declared in" + echo "$SCRIPT: $SBOPKG_CONF." + echo "Please, declare it and run $SCRIPT again." + exit 1 + fi . $SBOPKG_CONF +done + fi if [ ! -d "$SRCDIR" ]; then echo "Creating local cache directory $SRCDIR to keep \