allow hostname -f to fail and return empty output
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
		
					parent
					
						
							
								9123940255
							
						
					
				
			
			
				commit
				
					
						cd6abf379a
					
				
			
		
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org)
 | 
					# 2010-2014 Nico Schottelius (nico-cdist at schottelius.org)
 | 
				
			||||||
# 2012 Steven Armstrong (steven-cdist at armstrong.cc)
 | 
					# 2012 Steven Armstrong (steven-cdist at armstrong.cc)
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# This file is part of cdist.
 | 
					# This file is part of cdist.
 | 
				
			||||||
| 
						 | 
					@ -21,5 +21,5 @@
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if command -v hostname >/dev/null; then
 | 
					if command -v hostname >/dev/null; then
 | 
				
			||||||
   hostname -f
 | 
					   hostname -f 2>/dev/null || true
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue