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:
authornachoparker <nacho@ownyourbits.com>2017-09-30 18:10:55 +0300
committernachoparker <nacho@ownyourbits.com>2017-09-30 18:14:54 +0300
commitba9d6fdf2dd974cee7b03ed860dc707002f34565 (patch)
tree25ae5f64a12979b0e0c1aeb946feecf62a4b5847
parentcfcb53524bff5d4c5fa479a5d22224b186242131 (diff)
nc-format-USB: fix format disks >2TB and more (Closes #223)v0.31.5
-rw-r--r--changelog.md4
-rw-r--r--etc/nextcloudpi-config.d/nc-format-USB.sh12
2 files changed, 13 insertions, 3 deletions
diff --git a/changelog.md b/changelog.md
index 41778855..68ce35d1 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,7 @@
-[v0.31.4](https://github.com/nextcloud/nextcloudpi/commit/ebd1fc1) (2017-09-30) nc-format-USB: speed up ext4 creation with lazy initialization
+[v0.31.5](https://github.com/nextcloud/nextcloudpi/commit/7bca99d) (2017-09-30) nc-format-USB: fix format disks >2TB and more
+
+[v0.31.4](https://github.com/nextcloud/nextcloudpi/commit/cdf1822) (2017-09-30) nc-format-USB: speed up ext4 creation with lazy initialization
[v0.31.3 ](https://github.com/nextcloud/nextcloudpi/commit/c2abfaa) (2017-09-30) letsencrypt: fix uppercase domains cert path (Closes #229)
diff --git a/etc/nextcloudpi-config.d/nc-format-USB.sh b/etc/nextcloudpi-config.d/nc-format-USB.sh
index 60baab89..861a5db4 100644
--- a/etc/nextcloudpi-config.d/nc-format-USB.sh
+++ b/etc/nextcloudpi-config.d/nc-format-USB.sh
@@ -33,6 +33,9 @@ configure()
return 1;
}
+ # disable nc-automount if enabled
+ killall -STOP udiskie 2>/dev/null
+
# umount if mounted
umount /media/USBdrive* &> /dev/null
@@ -45,9 +48,14 @@ configure()
local NAME=( $( lsblk -l -n | grep -v mmcblk | grep disk | awk '{ print $1 }' ) )
[[ ${#NAME[@]} != 1 ]] && { echo "unexpected error"; return 1; }
- wipefs -a -f /dev/"$NAME" || return 1
- printf 'o\nn\np\n1\n\n\nw\n' | sudo fdisk /dev/"$NAME" || return 1
+ wipefs -a -f /dev/"$NAME" || return 1
+ parted /dev/"$NAME" --script -- mklabel gpt || return 2
+ parted /dev/"$NAME" --script -- mkpart primary 0% 100% || return 3
+ sleep 0.5
mkfs.ext4 -q -E lazy_itable_init=0,lazy_journal_init=0 -F /dev/"${NAME}1" -L "$LABEL_"
+
+ # enable nc-automount if enabled
+ killall -CONT udiskie 2>/dev/null
}
install() { :; }