Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomTurnschuh <36013390+TomTurnschuh@users.noreply.github.com>2018-09-15 02:03:12 +0300
committernacho <nacho@ownyourbits.com>2018-09-15 02:10:46 +0300
commita00cd0b54208b831073c120ef1fb45cb75e11faf (patch)
tree7f27195a6143a481c81073492ee81e021830e704
parente26a834b63da30904735636b0920ecfb7d0418b0 (diff)
nc-format-USB: drive number was off by one (#631)v0.59.8
Resolves #630 Delete `-1` in calculation of drives
-rw-r--r--etc/ncp-config.d/nc-format-USB.sh2
1 files changed, 1 insertions, 1 deletions
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 ]] && {