mirror of
https://abf.rosa.ru/djam/openssh.git
synced 2025-02-24 02:02:57 +00:00
Check if Avahi services directory exists and is writable
This commit is contained in:
parent
07d6ca5b5c
commit
f7a578aaac
2 changed files with 10 additions and 1 deletions
|
@ -12,6 +12,7 @@ load_vars(){
|
|||
SSHD_CONFIG="${SSHD_CONFIG:-/etc/ssh/sshd_config}"
|
||||
AVAHI_TEMPLATE="${AVAHI_TEMPLATE:-/etc/ssh/openssh_avahi.service}"
|
||||
AVAHI_SERVICE="${AVAHI_SERVICE:-/etc/avahi/services/openssh.service}"
|
||||
AVAHI_DIRECTORY="$(dirname "$AVAHI_SERVICE")"
|
||||
LOCK_FILE="${LOCK_FILE:-/run/openssh-avahi-helper.marker}"
|
||||
for i in "$SSHD_CONFIG" "$AVAHI_TEMPLATE"
|
||||
do
|
||||
|
@ -19,6 +20,14 @@ load_vars(){
|
|||
echo "Config file ${i} cannot be read!"
|
||||
return 1
|
||||
fi
|
||||
if [ ! -d "$AVAHI_DIRECTORY" ]; then
|
||||
echo "Avahi is probably not installed, exiting."
|
||||
exit 0
|
||||
fi
|
||||
if [ ! -w "$AVAHI_DIRECTORY" ]; then
|
||||
echo "Error: Avahi service directory is not writable!"
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
Summary: OpenSSH free Secure Shell (SSH) implementation
|
||||
Name: openssh
|
||||
Version: 7.9p1
|
||||
Release: 9
|
||||
Release: 10
|
||||
License: BSD
|
||||
Group: Networking/Remote access
|
||||
Url: http://www.openssh.com/
|
||||
|
|
Loading…
Add table
Reference in a new issue