Added in device validation for USB passthrough
This commit is contained in:
@@ -8076,6 +8076,10 @@ validate_port_number() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
validate_device_exists () {
|
||||||
|
[[ -e /dev/sde ]] || red_bold "The specified device does not exist: $1"
|
||||||
|
}
|
||||||
|
|
||||||
validate_dir_exists() {
|
validate_dir_exists() {
|
||||||
if [[ ! -d "$1" ]]; then
|
if [[ ! -d "$1" ]]; then
|
||||||
echo "must be an existing directory"
|
echo "must be an existing directory"
|
||||||
|
|||||||
@@ -3,3 +3,7 @@ validate_port_number() {
|
|||||||
red_bold "The port number provided is invalid: $1"
|
red_bold "The port number provided is invalid: $1"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
validate_device_exists () {
|
||||||
|
[[ -e /dev/sde ]] || red_bold "The specified device does not exist: $1"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user