mirror of
				https://github.com/TheLocehiliosan/yadm
				synced 2025-06-13 13:03:58 +00:00 
			
		
		
		
	Remove dependency on hostname (#182)
				
					
				
			This commit is contained in:
		
							parent
							
								
									75c19c9cc0
								
							
						
					
					
						commit
						96839a5743
					
				
							
								
								
									
										2
									
								
								yadm
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								yadm
									
									
									
									
									
								
							| @ -473,7 +473,7 @@ function set_local_alt_values() { | |||||||
| 
 | 
 | ||||||
|   local_host="$(config local.hostname)" |   local_host="$(config local.hostname)" | ||||||
|   if [ -z "$local_host" ] ; then |   if [ -z "$local_host" ] ; then | ||||||
|     local_host=$(hostname) |     local_host=$(uname -n) | ||||||
|     local_host=${local_host%%.*} # trim any domain from hostname |     local_host=${local_host%%.*} # trim any domain from hostname | ||||||
|   fi |   fi | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										4
									
								
								yadm.1
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								yadm.1
									
									
									
									
									
								
							| @ -496,7 +496,7 @@ See the CONFIGURATION section for more details about setting | |||||||
| .BR hostname , " h | .BR hostname , " h | ||||||
| Valid if the value matches the short hostname. | Valid if the value matches the short hostname. | ||||||
| Hostname is calculated by running | Hostname is calculated by running | ||||||
| .BR "hostname" , | .BR "uname -n" , | ||||||
| and trimming off any domain. | and trimming off any domain. | ||||||
| .TP | .TP | ||||||
| .B default | .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.class      YADM_CLASS      Locally defined yadm class | ||||||
|  yadm.distro     YADM_DISTRO     lsb_release -si |  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.os         YADM_OS         uname -s | ||||||
|  yadm.user       YADM_USER       id -u -n |  yadm.user       YADM_USER       id -u -n | ||||||
|  yadm.source     YADM_SOURCE     Template filename |  yadm.source     YADM_SOURCE     Template filename | ||||||
|  | |||||||
| @ -8,11 +8,6 @@ URL: https://yadm.io | |||||||
| License: GPL-3.0-only | License: GPL-3.0-only | ||||||
| Requires: bash | Requires: bash | ||||||
| Requires: git | 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 | Source: %{name}.tar.gz | ||||||
| BuildRoot: %{_tmppath}/%{name}-%{version}-build | BuildRoot: %{_tmppath}/%{name}-%{version}-build | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user