summaryrefslogtreecommitdiffstats
path: root/abs/core/openssh/install
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2020-10-04 19:09:40 (GMT)
committerBritney Fransen <brfransen@gmail.com>2020-10-04 19:09:40 (GMT)
commitc627cd1d68fdc382db3839d429327709aed5528d (patch)
treedebbfc3993d5e20df992252e5e6c8ef3d9e4bbc1 /abs/core/openssh/install
parent25f760889066017e85b157e8f55158dc6394e95e (diff)
downloadlinhes_pkgbuild-c627cd1d68fdc382db3839d429327709aed5528d.zip
linhes_pkgbuild-c627cd1d68fdc382db3839d429327709aed5528d.tar.gz
linhes_pkgbuild-c627cd1d68fdc382db3839d429327709aed5528d.tar.bz2
openssh: update to 8.4p1
Diffstat (limited to 'abs/core/openssh/install')
-rw-r--r--abs/core/openssh/install32
1 files changed, 32 insertions, 0 deletions
diff --git a/abs/core/openssh/install b/abs/core/openssh/install
new file mode 100644
index 0000000..47c1e77
--- /dev/null
+++ b/abs/core/openssh/install
@@ -0,0 +1,32 @@
+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
+}
+
+post_upgrade() {
+ if (( $(vercmp $2 8.2p1-3) < 0 )); then
+ if systemctl is-active sshd.service >/dev/null; then
+ cat <<EOF
+==> After this upgrade, your existing SSH daemon may be unable to accept
+==> new connections. To fix this, your SSH daemon will now be restarted.
+EOF
+ systemctl restart sshd.service
+ fi
+ fi
+}