1
0
Fork 0
mirror of synced 2024-11-04 17:08:56 -05:00

Remove dependency on hostname (#182)

This commit is contained in:
Tim Byrne 2019-11-30 10:27:28 -06:00
parent 75c19c9cc0
commit 96839a5743
No known key found for this signature in database
GPG key ID: 14DB4FC2465A4B12
3 changed files with 3 additions and 8 deletions

2
yadm
View file

@ -473,7 +473,7 @@ function set_local_alt_values() {
local_host="$(config local.hostname)"
if [ -z "$local_host" ] ; then
local_host=$(hostname)
local_host=$(uname -n)
local_host=${local_host%%.*} # trim any domain from hostname
fi

4
yadm.1
View file

@ -496,7 +496,7 @@ See the CONFIGURATION section for more details about setting
.BR hostname , " h
Valid if the value matches the short hostname.
Hostname is calculated by running
.BR "hostname" ,
.BR "uname -n" ,
and trimming off any domain.
.TP
.B default
@ -629,7 +629,7 @@ During processing, the following variables are available in the template:
------------- ------------- --------------------------
yadm.class YADM_CLASS Locally defined yadm class
yadm.distro YADM_DISTRO lsb_release -si
yadm.hostname YADM_HOSTNAME hostname (without domain)
yadm.hostname YADM_HOSTNAME uname -n (without domain)
yadm.os YADM_OS uname -s
yadm.user YADM_USER id -u -n
yadm.source YADM_SOURCE Template filename

View file

@ -8,11 +8,6 @@ URL: https://yadm.io
License: GPL-3.0-only
Requires: bash
Requires: git
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} >= 700
Requires: /usr/bin/hostname
%else
Requires: /bin/hostname
%endif
Source: %{name}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build