FreeBSD Bugzilla – Attachment 8967 Details for
Bug 18583
[PATCH] DHCP should be able to override hostname.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.81 KB, created by
brooks
on 2000-05-16 06:40:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
brooks
Created:
2000-05-16 06:40:00 UTC
Size:
1.81 KB
patch
obsolete
>--- /usr/src/etc/rc.network Tue May 9 15:00:17 2000 >+++ /etc/rc.network Wed May 10 09:51:03 2000 >@@ -16,8 +16,13 @@ > # Set the host name if it is not already set > # > if [ -z "`hostname -s`" ]; then >- hostname ${hostname} >- echo -n ' hostname' >+ if [ -n "${hostname}" ]; then >+ hostname ${hostname} >+ echo -n ' hostname' >+ elif [ -n "${default_hostname}" ]; then >+ hostname ${default_hostname} >+ echo -n ' default_hostname' >+ fi > fi > > # Set the domainname if we're using NIS >--- /usr/src/etc/defaults/rc.conf Tue May 9 15:00:17 2000 >+++ /etc/defaults/rc.conf Tue May 9 21:22:16 2000 >@@ -39,6 +39,7 @@ > > ### Basic network options: ### > hostname="" # Set this! >+default_hostname="" # Set this if you get your hostname elseware. > nisdomainname="NO" # Set to NIS domain if using NIS (or NO). > dhcp_program="/sbin/dhclient" # Path to dhcp client program. > dhcp_flags="" # Additional flags to pass to dhcp client. >--- /usr/src/contrib/isc-dhcp/client/scripts/freebsd Sat Jan 15 14:46:40 2000 >+++ /sbin/dhclient-script Tue May 9 21:44:59 2000 >@@ -76,7 +76,7 @@ > if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \ > [ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then > current_hostname=`/bin/hostname` >- if [ x$current_hostname = x ] || \ >+ if [ x$current_hostname = x`rc_conf_var default_hostname` ] || \ > [ x$current_hostname = x$old_host_name ]; then > if [ x$new_host_name != x$old_host_name ]; then > $LOGGER "New Hostname: $new_host_name" >--- /sbin/rc_conf_var.orig Wed May 10 11:19:16 2000 >+++ /sbin/rc_conf_var Tue May 9 21:40:06 2000 >@@ -0,0 +1,13 @@ >+#!/bin/sh >+# $FreeBSD$ >+ >+# If there is a global system configuration file, suck it in. >+# >+if [ -r /etc/defaults/rc.conf ]; then >+ . /etc/defaults/rc.conf >+ source_rc_confs >+elif [ -r /etc/rc.conf ]; then >+ . /etc/rc.conf >+fi >+ >+eval echo \$${1}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 18583
: 8967