Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dhcp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
71
Issues
71
List
Boards
Labels
Service Desk
Milestones
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
dhcp
Commits
2cd9d72c
Commit
2cd9d72c
authored
Sep 08, 1999
by
Ted Lemon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for setting hostname
parent
c5e75aab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
0 deletions
+22
-0
client/scripts/freebsd
client/scripts/freebsd
+7
-0
client/scripts/linux
client/scripts/linux
+7
-0
client/scripts/netbsd
client/scripts/netbsd
+8
-0
No files found.
client/scripts/freebsd
View file @
2cd9d72c
...
...
@@ -72,6 +72,13 @@ fi
if
[
x
$reason
=
xBOUND
]
||
[
x
$reason
=
xRENEW
]
||
\
[
x
$reason
=
xREBIND
]
||
[
x
$reason
=
xREBOOT
]
;
then
current_hostname
=
`
/bin/hostname
`
if
[
x
$current_hostname
=
x
]
||
\
[
x
$current_hostname
=
x
$old_host_name
]
;
then
if
[
x
$new_host_name
!=
x
$old_host_name
]
;
then
hostname
$new_host_name
fi
fi
if
[
x
$old_ip_address
!=
x
]
&&
[
x
$alias_ip_address
!=
x
]
&&
\
[
x
$alias_ip_address
!=
x
$old_ip_address
]
;
then
ifconfig
$interface
inet
-alias
$alias_ip_address
>
/dev/null 2>&1
...
...
client/scripts/linux
View file @
2cd9d72c
...
...
@@ -96,6 +96,13 @@ fi
if
[
x
$reason
=
xBOUND
]
||
[
x
$reason
=
xRENEW
]
||
\
[
x
$reason
=
xREBIND
]
||
[
x
$reason
=
xREBOOT
]
;
then
current_hostname
=
`
hostname
`
if
[
x
$current_hostname
=
x
]
||
\
[
x
$current_hostname
=
x
$old_host_name
]
;
then
if
[
x
$new_host_name
!=
x
$old_host_name
]
;
then
hostname
$new_host_name
fi
fi
if
[
x
$old_ip_address
!=
x
]
&&
[
x
$alias_ip_address
!=
x
]
&&
\
[
x
$alias_ip_address
!=
x
$old_ip_address
]
;
then
# Possible new alias. Remove old alias.
...
...
client/scripts/netbsd
View file @
2cd9d72c
...
...
@@ -72,6 +72,14 @@ fi
if
[
x
$reason
=
xBOUND
]
||
[
x
$reason
=
xRENEW
]
||
\
[
x
$reason
=
xREBIND
]
||
[
x
$reason
=
xREBOOT
]
;
then
current_hostname
=
`
/bin/hostname
`
if
[
x
$current_hostname
=
x
]
||
\
[
x
$current_hostname
=
x
$old_host_name
]
;
then
if
[
x
$new_host_name
!=
x
$old_host_name
]
;
then
hostname
$new_host_name
fi
fi
if
[
x
$old_ip_address
!=
x
]
&&
[
x
$alias_ip_address
!=
x
]
&&
\
[
x
$alias_ip_address
!=
x
$old_ip_address
]
;
then
ifconfig
$interface
inet
-alias
$alias_ip_address
>
/dev/null 2>&1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment