Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106055637
D2577.id6842.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D2577.id6842.diff
View Options
Index: etc/rc.d/hostname
===================================================================
--- etc/rc.d/hostname
+++ etc/rc.d/hostname
@@ -33,22 +33,22 @@
. /etc/rc.subr
. /etc/network.subr
-name="hostname"
-start_cmd="hostname_start"
-stop_cmd=":"
+name=hostname
+
+load_rc_config $name
+
+start_cmd=hostname_start
+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.
@@ -77,5 +77,4 @@
check_startmsgs && echo '.'
}
-load_rc_config $name
run_rc_command "$1"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 25, 3:18 PM (11 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15597008
Default Alt Text
D2577.id6842.diff (1 KB)
Attached To
Mode
D2577: /etc/rc.d/hostname: permit setting hostname if already set
Attached
Detach File
Event Timeline
Log In to Comment