From 416788cbc848fe3c090830bc5d8a6b5a7243eba4 Mon Sep 17 00:00:00 2001 From: Dunestorm Date: Sat, 23 May 2020 18:52:31 +0100 Subject: [PATCH] Smart iSCSI Mounter v0.98.5 - Refactored variables. - Removed anomalous variable from quiet function. --- Smart-iSCSI/smart-iscsi.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Smart-iSCSI/smart-iscsi.sh b/Smart-iSCSI/smart-iscsi.sh index e2cb2d9..6cdd85e 100755 --- a/Smart-iSCSI/smart-iscsi.sh +++ b/Smart-iSCSI/smart-iscsi.sh @@ -1,8 +1,9 @@ #!/bin/bash -# Do not modify _RELEASE_VER="0.98.5" -_CONF_FILE=$1 + +# Do not modify +_CUSTOM_CONF_FILE=$1 _MONITOR_PROC_CNT= _ISCSI_CON= _FLAG_FORCE=0 @@ -14,15 +15,15 @@ read_iscsi_con (){ } load_conf_file (){ - _DEFAULT_CONF_FILE=$(echo /etc/smart-iscsi/$_CONF_FILE.conf) + _default_conf_file=$(echo /etc/smart-iscsi/$_CUSTOM_CONF_FILE.conf) - if [ -e $_DEFAULT_CONF_FILE ] + if [ -e $_default_conf_file ] then - source $_DEFAULT_CONF_FILE + source $_default_conf_file else - if [ -e $_CONF_FILE ] + if [ -e $_CUSTOM_CONF_FILE ] then - source $_CONF_FILE + source $_CUSTOM_CONF_FILE else echo "ERROR: Config file not specified!" exit 2; @@ -154,7 +155,6 @@ check_admin (){ for arg in "$@"; do case "$arg" in -q|--quiet) - read_iscsi_con _FLAG_QUIET=1 shift ;;