Skip to content

Commit a06c76e

Browse files
author
Kristan Kenney
committed
Fix for missing acl package during upgrade
apt package lock must be temporarily disabled during upgrade script execution, as apt can not run within itself.
1 parent 1aac728 commit a06c76e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

install/upgrade/0.10.0-190430.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,23 @@ fi
174174
# Check if acl package is installed
175175
echo "(*) Verifying ACLs and hardening user permissions..."
176176
if [ ! -e '/usr/bin/setfacl' ]; then
177+
# Disable apt package lock
178+
mv /var/lib/dpkg/lock-frontend /var/lib/dpkg/lock-frontend.bak
179+
mv /var/lib/dpkg/lock /var/lib/dpkg/lock.bak
180+
mv /var/cache/apt/archives/lock /var/cache/apt/archives/lock.bak
181+
mv /var/lib/dpkg/updates/ /var/lib/dpkg/updates.bak/
182+
mkdir -p /var/lib/dpkg/updates/
183+
184+
# Install missing acl package
177185
apt-get -qq update > /dev/null 2>&1
178186
apt-get -qq -y install acl > /dev/null 2>&1
187+
188+
# Enable apt package lock
189+
mv /var/lib/dpkg/lock-frontend.bak /var/lib/dpkg/lock-frontend
190+
mv /var/lib/dpkg/lock.bak /var/lib/dpkg/lock
191+
mv /var/cache/apt/archives/lock.bak /var/cache/apt/archives/lock
192+
rm -rf /var/lib/dpkg/updates/
193+
mv /var/lib/dpkg/updates.bak/ /var/lib/dpkg/updates/
179194
fi
180195

181196
# Add a general group for normal users created by Hestia

0 commit comments

Comments
 (0)