Smart iSCSI Mounter v0.98.5

- Refactored variables.
- Removed anomalous variable from quiet function.
This commit is contained in:
2020-05-23 18:52:31 +01:00
parent d6cd7bbfee
commit 416788cbc8
+8 -8
View File
@@ -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
;;