Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use dhclient hooks instead of proprietary pump hooks for dhcphostname
- Loading branch information
Showing
5 changed files
with
14 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../dhcp3/dhclient-exit-hooks.d/grml-sethostname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# only run the comamnd if we bound to a new ip | ||
case "$reason" in BOUND) | ||
if ! grep -q 'nodhcphostname' /proc/cmdline && [ -f /etc/grml_cd ] ; then | ||
|
||
hostname=$(busybox nslookup "$new_ip_address" | awk '/Address 1: '$new_ip_address'/ {print $4}') | ||
if [ -n "$hostname" ] ; then | ||
grml-hostname "$hostname" | ||
hostname -F /etc/hostname | ||
fi | ||
fi | ||
;; | ||
esac |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.