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 17
17
# this is a replica of ncp-update, but from devel branch
18
18
install ()
19
19
{
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; }
28
21
echo -e " Downloading updates"
29
22
rm -rf /tmp/ncp-update-tmp
30
23
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()
143
143
rmdir tmpmnt & > /dev/null
144
144
}
145
145
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
+
146
162
function download_resize_raspbian_img()
147
163
{
148
164
local SIZE=$1
Original file line number Diff line number Diff line change 1
1
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"
3
3
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
5
7
6
8
[ v0.33.0 ] ( https://github.com/nextcloud/nextcloudpi/commit/d478a34 ) (2017-11-06) added redis
7
9
Original file line number Diff line number Diff line change @@ -49,10 +49,6 @@ EXCL_DOCKER+="
49
49
nc-update.sh
50
50
nc-autoupdate-ncp.sh
51
51
"
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
-
56
52
cp etc/library.sh /usr/local/etc/
57
53
58
54
source /usr/local/etc/library.sh
You can’t perform that action at this time.
0 commit comments