From a00cd0b54208b831073c120ef1fb45cb75e11faf Mon Sep 17 00:00:00 2001 From: TomTurnschuh <36013390+TomTurnschuh@users.noreply.github.com> Date: Sat, 15 Sep 2018 01:03:12 +0200 Subject: nc-format-USB: drive number was off by one (#631) Resolves #630 Delete `-1` in calculation of drives --- etc/ncp-config.d/nc-format-USB.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/ncp-config.d/nc-format-USB.sh b/etc/ncp-config.d/nc-format-USB.sh index 61360817..fa2d154b 100644 --- a/etc/ncp-config.d/nc-format-USB.sh +++ b/etc/ncp-config.d/nc-format-USB.sh @@ -20,7 +20,7 @@ careful, this will destroy any data in the USB drive configure() { # count all disk devices except mmcblk0 - local NUM=$(( $( lsblk -ln | grep "^sd[[:alpha:]].*disk" | awk '{ print $6 }' | wc -l ) - 1 )) + local NUM=$( lsblk -ln | grep "^sd[[:alpha:]].*disk" | awk '{ print $6 }' | wc -l ) # only one plugged in [[ $NUM != 1 ]] && { -- cgit v1.2.3