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
path: root/etc
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2018-06-21 08:46:59 +0300
committernachoparker <nacho@ownyourbits.com>2018-06-21 08:47:17 +0300
commitde5d9fb86ec0c6a5482a51e8dc865011d4e15f46 (patch)
treedfb03c9878a44d3a1a789105c5700479f201d581 /etc
parentd82a635eb16c0be7c02dec84f5cea4309209b627 (diff)
nc-format-USB: fix when ZRAM activev0.57.9
Diffstat (limited to 'etc')
-rw-r--r--etc/ncp-config.d/nc-format-USB.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/ncp-config.d/nc-format-USB.sh b/etc/ncp-config.d/nc-format-USB.sh
index e9981c84..d8bc0817 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 -l -n | grep -v zram | awk '{ print $6 }' | grep disk | wc -l ) - 1 ))
+ local NUM=$(( $( lsblk -ln | grep -v zram | awk '{ print $6 }' | grep disk | wc -l ) - 1 ))
# only one plugged in
[[ $NUM != 1 ]] && {
@@ -40,7 +40,7 @@ configure()
done
# do it
- local NAME=( $( lsblk -l -n | grep -v mmcblk | grep disk | awk '{ print $1 }' ) )
+ local NAME=( $( lsblk -ln | grep -v -e mmcblk -e zram | grep disk | awk '{ print $1 }' ) )
[[ ${#NAME[@]} != 1 ]] && { echo "unexpected error"; return 1; }
wipefs -a -f /dev/"$NAME" || return 1