Skip to content

Commit

Permalink
nc-format-USB: drive number was off by one (#631)
Browse files Browse the repository at this point in the history
Resolves #630
Delete `-1` in calculation of drives
  • Loading branch information
TomTurnschuh authored and nachoparker committed Sep 14, 2018
1 parent e26a834 commit a00cd0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion etc/ncp-config.d/nc-format-USB.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]] && {
Expand Down

0 comments on commit a00cd0b

Please sign in to comment.