mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
20 lines
600 B
Text
20 lines
600 B
Text
pre_upgrade() {
|
|
# Remove socket activation. See: https://bugs.archlinux.org/task/62248
|
|
if (( $(vercmp $2 8.0p1-3) < 0 )); then
|
|
if systemctl is-enabled -q sshd.socket; then
|
|
cat <<EOF
|
|
==> This package no longer provides sshd.socket and sshd@.service;
|
|
==> copies of those files will be placed under /etc/systemd/system
|
|
==> but please migrate to sshd.service whenever possible.
|
|
EOF
|
|
src=/usr/lib/systemd/system
|
|
dst=/etc/systemd/system
|
|
for i in sshd.socket sshd\@.service; do
|
|
if [[ ! -e "$dst/$i" ]]; then
|
|
cp -v "$src/$i" "$dst/$i"
|
|
fi
|
|
done
|
|
systemctl reenable sshd.socket
|
|
fi
|
|
fi
|
|
}
|