Commit eaa25b5d authored by Vitaly Lipatov's avatar Vitaly Lipatov

loginhsh: add -v (verbose) param

parent cafc5cad
......@@ -32,6 +32,7 @@ phelp()
echog " -i - initialize hasher"
echog " -c - cleanup hasher"
echog " -o - log in as root user"
echog " -v - verbose"
echog " -t - use test hasher dir (different to build hasher)"
echog " -M?? - branch name"
echog "Extra options:"
......@@ -39,7 +40,7 @@ phelp()
echog " -r - remote login to hasher"
}
while getopts :chitoa opt; do
while getopts :chitoav opt; do
case $opt in
h) phelp; exit 0;;
t) TESTMODE=1 ;;
......@@ -47,6 +48,7 @@ while getopts :chitoa opt; do
c) CLEANUP=1 ;;
a) AUTOMODE=1 ;;
r) REMOTE=1 ;;
v) VERBOSE="-v" ;;
o) ROOTER="--rooter" ;;
+?) echog "$name: options should not be preceded by a '+'." 1>&2; exit 2;;
# ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
......@@ -92,7 +94,8 @@ fi
if [ ! -d $HASHERDIR ] || [ "$INITIALIZE" = "1" ] || [ -n "$AUTOMODE" ]; then
echog "Initialize $HASHERDIR ..."
mkdir -p $HASHERDIR && $HSH $HASHERARG --initroot-only $HASHERDIR || fatal "mkdir"
mkdir -p $HASHERDIR || fatal "mkdir"
$HSH $VERBOSE $HASHERARG --initroot-only $HASHERDIR || fatal "Cannot initialize hasher"
fi
SHELLHASHERARG="--mountpoints=/proc"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment