File runminisatip of Package minisatip
#!/bin/bash
#
# runminisat - configurable minisat launcher script
#
# Copyright (C) 2022 Walter Laub
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# The author can be reached at <walter.laub(a)freenet.de>
#
RUNMINISATIPCONF="/etc/runminisatip.conf"
function LoadConfFile() {
# 1st clean the options
DRV2LOAD=
MINISATIPOPT=
# Load configuration file
if [ -n "${RUNMINISATIPCONF}" ] ; then
if [ -r "${RUNMINISATIPCONF}" ] ; then
. "${RUNMINISATIPCONF}" || { echo "runminisatip: "${RUNMINISATIPCONF}" returned with $?." >&2 ; exit 1 ; }
else
echo "runminisatip: "${RUNMINISATIPCONF}" not found." >&2
fi
fi
return 0
}
### main
# default to system language
if [ -z "${LANGUAGE}" ]; then
. /etc/sysconfig/language
LANGUAGE="${RC_LANG}"
fi
if [ -n "${LANGUAGE}" ] ; then
LC_ALL="${LANGUAGE}"
export LC_ALL
fi
# load and process all configuration
LoadConfFile || exit 1
# load drivers
for DRV in ${DRV2LOAD} ; do
modprobe ${DRV}
done
# start minisatip
minisatip ${MINISATIPOPT}