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-08 11:18:58 +0300
committernachoparker <nacho@ownyourbits.com>2017-09-08 11:19:20 +0300
commitb1c5fa66949620de7756db304aeb2a1f15656f40 (patch)
tree33a80e999c6756c08c86498d2fff3675d0c30566
parent82d72e9759a37130519e34b6620b2fae37ae5d38 (diff)
build devel: deactivate unattended upgrades
-rw-r--r--build-devel.sh1
-rw-r--r--changelog.md6
-rwxr-xr-xetc/library.sh16
3 files changed, 22 insertions, 1 deletions
diff --git a/build-devel.sh b/build-devel.sh
index f83d5ddf..e37bf687 100644
--- a/build-devel.sh
+++ b/build-devel.sh
@@ -17,6 +17,7 @@
# this is a replica of ncp-update, but from devel branch
install()
{
+ test -f /etc/apt/apt.conf.d/20nextcloudpi-upgrades && { echo "deactivate unattended upgrades first"; return 1; }
echo -e "Downloading updates"
rm -rf /tmp/ncp-update-tmp
git clone --depth 20 -q -b devel https://github.com/nextcloud/nextcloudpi.git /tmp/ncp-update-tmp
diff --git a/changelog.md b/changelog.md
index d6c2ab6c..ab019cab 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,9 @@
-[v0.26.20](https://github.com/nextcloud/nextcloudpi/commit/bbbe114) (2017-09-08) backend: is_active() functionality
+[v0.26.22](https://github.com/nextcloud/nextcloudpi/commit/e38f24c) (2017-09-08) build devel: deactivate unattended upgrades
+
+[v0.26.21](https://github.com/nextcloud/nextcloudpi/commit/64e878d) (2017-09-08) tag images
+
+[v0.26.20](https://github.com/nextcloud/nextcloudpi/commit/fb900b8) (2017-09-08) backend: is_active() functionality
[v0.26.19](https://github.com/nextcloud/nextcloudpi/commit/9e7b3ab) (2017-09-08) letsencrypt: occ path fix
diff --git a/etc/library.sh b/etc/library.sh
index bd45b4f5..6ecb95e6 100755
--- a/etc/library.sh
+++ b/etc/library.sh
@@ -279,6 +279,22 @@ function copy_to_image()
rmdir tmpmnt &>/dev/null
}
+function deactivate_unattended_upgrades()
+{
+ local IMG=$1
+ local SECTOR
+ local OFFSET
+ SECTOR=$( fdisk -l "$IMG" | grep Linux | awk '{ print $2 }' )
+ OFFSET=$(( SECTOR * 512 ))
+
+ [ -f "$IMG" ] || { echo "no image"; return 1; }
+ mkdir -p tmpmnt
+ sudo mount "$IMG" -o offset="$OFFSET" tmpmnt || return 1
+ rm -f tmpmnt/etc/apt/apt.conf.d/20nextcloudpi-upgrades
+ sudo umount -l tmpmnt
+ rmdir tmpmnt &>/dev/null
+}
+
function download_resize_raspbian_img()
{
local SIZE=$1