aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/vdev_id
diff options
context:
space:
mode:
authorAnton Gubarkov <[email protected]>2021-08-25 23:01:26 +0300
committerGitHub <[email protected]>2021-08-25 13:01:26 -0700
commitb0f3f393d135e0f69c28ef2ca11508a4a2559ee6 (patch)
treef341661e1eafb2ab70df63aa6bf59b5f8cccc17b /cmd/vdev_id
parent2e9e2c8ff519916e57dd36b3855dfec059bbf611 (diff)
vdev_id: Return an error if config file is not found (#12508)
Signed-off-by: Anton Gubarkov <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'cmd/vdev_id')
-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