importer: add verbose mode

This commit is contained in:
Franco Fichtner 2022-04-22 08:30:40 +02:00
parent 206f0d2f12
commit a507738bbd
2 changed files with 14 additions and 4 deletions

View File

@ -1,5 +1,5 @@
.\"
.\" Copyright (c) 2018-2021 Franco Fichtner <franco@opnsense.org>
.\" Copyright (c) 2018-2022 Franco Fichtner <franco@opnsense.org>
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd December 15, 2021
.Dd April 22, 2022
.Dt OPNSENSE-IMPORTER 8
.Os
.Sh NAME
@ -32,7 +32,7 @@
.Nd OPNsense import utility
.Sh SYNOPSIS
.Nm
.Op Fl bmpz
.Op Fl bmpVz
.Op Ar disk
.Sh DESCRIPTION
The
@ -68,6 +68,8 @@ system for custom repairs.
Run the importer in password reset mode, which mounts the disk and
invokes the builtin root password prompt and after change adjusts
authentication settings to know good defaults.
.It Fl V
Set debug mode for shell script output.
.It Fl z
List all available ZFS pools to the system and exit.
The listing consists of the

View File

@ -37,6 +37,7 @@ fi
DO_BOOT=
DO_MANUAL=
DO_PASSWORD=
DO_VERBOSE=
DO_ZFS=
bootstrap_and_exit()
@ -73,7 +74,7 @@ bootstrap_and_exit()
exit "${RET}"
}
while getopts bmpz OPT; do
while getopts bmpzV OPT; do
case ${OPT} in
b)
DO_BOOT="-b"
@ -84,6 +85,9 @@ while getopts bmpz OPT; do
p)
DO_PASSWORD="-p"
;;
V)
DO_VERBOSE="-V"
;;
z)
DO_ZFS="-z"
;;
@ -96,6 +100,10 @@ done
shift $((OPTIND - 1))
if [ -n "${DO_VERBOSE}" ]; then
set -x
fi
DO_DEV=${1}
timeout_prompt()