diff --git a/src/man/man8/opnsense-importer.8 b/src/man/man8/opnsense-importer.8 index 027e41b97..69d477d4d 100644 --- a/src/man/man8/opnsense-importer.8 +++ b/src/man/man8/opnsense-importer.8 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2018-2021 Franco Fichtner +.\" Copyright (c) 2018-2022 Franco Fichtner .\" .\" 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 diff --git a/src/sbin/opnsense-importer b/src/sbin/opnsense-importer index 377e86cd8..5f460299f 100755 --- a/src/sbin/opnsense-importer +++ b/src/sbin/opnsense-importer @@ -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()