File tree Expand file tree Collapse file tree 4 files changed +21
-14
lines changed Expand file tree Collapse file tree 4 files changed +21
-14
lines changed Original file line number Diff line number Diff line change 1717# this is a replica of ncp-update, but from devel branch
1818install ()
1919{
20- # wait for other apt processes
21- test -f /var/lib/apt/lists/lock && echo " waiting for apt processes to finish..." && \
22- while : ; do
23- test -f /var/lib/apt/lists/lock && break
24- sleep 1
25- done
26- rm -f /etc/apt/apt.conf.d/20nextcloudpi-upgrades
27-
20+ test -f /etc/apt/apt.conf.d/20nextcloudpi-upgrades && { echo " deactivate unattended upgrades first" ; return 1; }
2821 echo -e " Downloading updates"
2922 rm -rf /tmp/ncp-update-tmp
3023 git clone --depth 20 -q -b devel https://github.com/nextcloud/nextcloudpi.git /tmp/ncp-update-tmp
Original file line number Diff line number Diff line change @@ -143,6 +143,22 @@ function copy_to_image()
143143 rmdir tmpmnt & > /dev/null
144144}
145145
146+ function deactivate_unattended_upgrades()
147+ {
148+ local IMG=$1
149+ local SECTOR
150+ local OFFSET
151+ SECTOR=$( fdisk -l " $IMG " | grep Linux | awk ' { print $2 }' )
152+ OFFSET=$(( SECTOR * 512 ))
153+
154+ [ -f " $IMG " ] || { echo " no image" ; return 1; }
155+ mkdir -p tmpmnt
156+ sudo mount " $IMG " -o offset=" $OFFSET " tmpmnt || return 1
157+ sudo rm -f tmpmnt/etc/apt/apt.conf.d/20nextcloudpi-upgrades
158+ sudo umount -l tmpmnt
159+ rmdir tmpmnt & > /dev/null
160+ }
161+
146162function download_resize_raspbian_img()
147163{
148164 local SIZE=$1
Original file line number Diff line number Diff line change 11
2- [ v0.34.1 ] ( https://github.com/nextcloud/nextcloudpi/commit/36d2ee5 ) (2017-11-09) nc-nextcloud: added more logging
2+ [ v0.34.2 ] ( https://github.com/nextcloud/nextcloudpi/commit/490c8fb ) (2017-11-09) Revert "update: wait running apt processes"
33
4- [ v0.34.0] ( https://github.com/nextcloud/nextcloudpi/commit/bdf1b13 ) (2017-11-07) added NCP custom theme with new logo
4+ [ v0.34.1] ( https://github.com/nextcloud/nextcloudpi/commit/343c406 ) (2017-11-09) nc-nextcloud: added more logging
5+
6+ [ v0.34.0 ] ( https://github.com/nextcloud/nextcloudpi/commit/bdf1b13 ) (2017-11-07) added NCP custom theme with new logo
57
68[ v0.33.0 ] ( https://github.com/nextcloud/nextcloudpi/commit/d478a34 ) (2017-11-06) added redis
79
Original file line number Diff line number Diff line change @@ -49,10 +49,6 @@ EXCL_DOCKER+="
4949nc-update.sh
5050nc-autoupdate-ncp.sh
5151"
52-
53- # wait for other apt processes
54- test -f /var/lib/apt/lists/lock && { echo " apt is currently running. Try again later" ; exit 1; }
55-
5652cp etc/library.sh /usr/local/etc/
5753
5854source /usr/local/etc/library.sh
You can’t perform that action at this time.
0 commit comments