Remove dependency on hostname
(#182)
This commit is contained in:
parent
75c19c9cc0
commit
96839a5743
3 changed files with 3 additions and 8 deletions
2
yadm
2
yadm
|
@ -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
4
yadm.1
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue