svn commit: r286671 - head/etc/rc.d

Mark Felder feld at FreeBSD.org
Wed Aug 12 16:22:11 UTC 2015


Author: feld (ports committer)
Date: Wed Aug 12 16:22:10 2015
New Revision: 286671
URL: https://svnweb.freebsd.org/changeset/base/286671

Log:
  etc/rc.d/hostname: permit setting hostname if already set
  
  Approved by:	dteske
  Differential Revision:	https://reviews.freebsd.org/D2577

Modified:
  head/etc/rc.d/hostname

Modified: head/etc/rc.d/hostname
==============================================================================
--- head/etc/rc.d/hostname	Wed Aug 12 16:17:00 2015	(r286670)
+++ head/etc/rc.d/hostname	Wed Aug 12 16:22:10 2015	(r286671)
@@ -39,16 +39,13 @@ stop_cmd=":"
 
 hostname_start()
 {
-	# If we are not inside a jail, set the host name if it is not already set.
-	# If we are inside a jail, set the host name even if it is already set,
-	# but first check if it is permitted.
+	# If we are not inside a jail, set the host name.
+	# If we are inside a jail, set the host name if it is permitted.
 	#
 	if [ `$SYSCTL_N security.jail.jailed` -eq 1 ]; then
 		if [ `$SYSCTL_N security.jail.set_hostname_allowed` -eq 0 ]; then
 			return
 		fi
-	elif [ -n "`/bin/hostname -s`" ]; then
-		return
 	else
 		# If we're not in a jail and rc.conf doesn't specify a
 		# hostname, see if we can get one from kenv.


More information about the svn-src-head mailing list