Skip to content

Commit 312ca4e

Browse files
arshad512jsai20
authored andcommitted
vdev_id: Add error message when $CONFIG is missing
It was observed that vdev_id exists silently when the $CONFIG file is missing. This patch adds error message in case vdev_id is called without default $CONFIG or '-c'. This makes end user observe the exit message more easily. Before Patch: ~~~~~~~~~~~~~ $ ./cmd/vdev_id/vdev_id $ After Patch: ~~~~~~~~~~~~ $ ./cmd/vdev_id/vdev_id Error: Config file "/etc/zfs/vdev_id.conf" not found $ Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Arshad Hussain <[email protected]> Closes openzfs#11498
1 parent e91611e commit 312ca4e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmd/vdev_id/vdev_id

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@ while getopts 'c:d:eg:mp:h' OPTION; do
545545
done
546546

547547
if [ ! -r $CONFIG ] ; then
548+
echo "Error: Config file \"$CONFIG\" not found"
548549
exit 0
549550
fi
550551

0 commit comments

Comments
 (0)