Skip to content

Commit

Permalink
Remove dependency on hostname (yadm-dev#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLocehiliosan committed Nov 30, 2019
1 parent 75c19c9 commit 96839a5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion yadm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions yadm.1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions yadm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 96839a5

Please sign in to comment.