Smart iSCSI Mounter v0.98.5
- Refactored variables. - Removed anomalous variable from quiet function.
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Do not modify
|
|
||||||
_RELEASE_VER="0.98.5"
|
_RELEASE_VER="0.98.5"
|
||||||
_CONF_FILE=$1
|
|
||||||
|
# Do not modify
|
||||||
|
_CUSTOM_CONF_FILE=$1
|
||||||
_MONITOR_PROC_CNT=
|
_MONITOR_PROC_CNT=
|
||||||
_ISCSI_CON=
|
_ISCSI_CON=
|
||||||
_FLAG_FORCE=0
|
_FLAG_FORCE=0
|
||||||
@@ -14,15 +15,15 @@ read_iscsi_con (){
|
|||||||
}
|
}
|
||||||
|
|
||||||
load_conf_file (){
|
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
|
then
|
||||||
source $_DEFAULT_CONF_FILE
|
source $_default_conf_file
|
||||||
else
|
else
|
||||||
if [ -e $_CONF_FILE ]
|
if [ -e $_CUSTOM_CONF_FILE ]
|
||||||
then
|
then
|
||||||
source $_CONF_FILE
|
source $_CUSTOM_CONF_FILE
|
||||||
else
|
else
|
||||||
echo "ERROR: Config file not specified!"
|
echo "ERROR: Config file not specified!"
|
||||||
exit 2;
|
exit 2;
|
||||||
@@ -154,7 +155,6 @@ check_admin (){
|
|||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
-q|--quiet)
|
-q|--quiet)
|
||||||
read_iscsi_con
|
|
||||||
_FLAG_QUIET=1
|
_FLAG_QUIET=1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user