Commit a2b37fea authored by Natanael Copa's avatar Natanael Copa
Browse files

setup-disk: exit if either mode or disk is 'none'

parent 4ad15542
......@@ -1468,7 +1468,9 @@ while getopts "hek:Lm:o:qrs:v" opt; do
done
shift $(( $OPTIND - 1))
[ "$DISK_MODE" = "none" ] && exit 0
if [ "$DISK_MODE" = "none" ] || [ "$1" = "none" ]; then
exit 0
fi
if is_rpi; then
: ${BOOTLOADER:=raspberrypi-bootloader}
......
......@@ -2,15 +2,23 @@
. $(atf_get_srcdir)/test_env.sh
init_tests \
setup_disk_usage
setup_disk_usage \
setup_disk_mode_none \
setup_disk_none \
setup_disk_usage_body() {
test_usage setup-disk
}
setup_disk_usage_body() {
setup_disk_mode_none_body() {
init_env
atf_check -s exit:0 \
setup-disk -m none
}
setup_disk_none_body() {
init_env
atf_check -s exit:0 \
setup-disk none
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment