summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Gubarkov <anton.gubarkov@gmail.com>2021-08-25 23:01:26 +0300
committerTony Hutter <hutter2@llnl.gov>2021-09-14 14:36:32 -0700
commitbc371b28067b3230674f605fc4734ce93759b4f2 (patch)
treecb71514116919524522b87e6b5fa5b7d1f25217b
parente78d06f89b021d2b870b7a19c70d251164250383 (diff)
vdev_id: Return an error if config file is not found
Signed-off-by: Anton Gubarkov <anton.gubarkov@gmail.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
-rwxr-xr-xcmd/vdev_id/vdev_id5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/vdev_id/vdev_id b/cmd/vdev_id/vdev_id
index d349ba43c..cad59c93f 100755
--- a/cmd/vdev_id/vdev_id
+++ b/cmd/vdev_id/vdev_id
@@ -140,7 +140,8 @@ Usage: vdev_id [-h]
-p number of phy's per switch port [default=$PHYS_PER_PORT]
-h show this summary
EOF
- exit 0
+ exit 1
+ # exit with error to avoid processing usage message by a udev rule
}
map_slot() {
@@ -728,7 +729,7 @@ done
if [ ! -r "$CONFIG" ] ; then
echo "Error: Config file \"$CONFIG\" not found"
- exit 0
+ exit 1
fi
if [ -z "$DEV" ] && [ -z "$ENCLOSURE_MODE" ] ; then