Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2508)

Unified Diff: dhcpcd-hooks/29-lookup-hostname

Issue 2428004: Overhaul dhcpcd for chrome os use (Closed) Base URL: ssh://git@chromiumos-git//dhcpcd.git
Patch Set: purge hooks from configure to silence complaint Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dhcpcd-hooks/20-resolv.conf ('k') | dhcpcd-hooks/30-hostname » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dhcpcd-hooks/29-lookup-hostname
diff --git a/dhcpcd-hooks/29-lookup-hostname b/dhcpcd-hooks/29-lookup-hostname
deleted file mode 100644
index ce131225d6329cff4b9c0f0f17707c7848a335e9..0000000000000000000000000000000000000000
--- a/dhcpcd-hooks/29-lookup-hostname
+++ /dev/null
@@ -1,34 +0,0 @@
-# Lookup the hostname in DNS if not set
-
-lookup_hostname()
-{
- [ -z "$new_ip_address" ] && return 1
- local h=
- # Silly ISC programs love to send error text to stdout
- if type dig >/dev/null 2>&1; then
- h=$(dig +short -x $new_ip_address)
- if [ $? = 0 ]; then
- echo "$h" | sed 's/\.$//'
- return 0
- fi
- elif type host >/dev/null 2>&1; then
- h=$(host $new_ip_address)
- if [ $? = 0 ]; then
- echo "$h" \
- | sed 's/.* domain name pointer \(.*\)./\1/'
- return 0
- fi
- fi
- return 1
-}
-
-set_hostname()
-{
- if [ -z "$new_host_name" -a -z "$new_fqdn_name" ]; then
- export new_host_name="$(lookup_hostname)"
- fi
-}
-
-case "$reason" in
-BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT|STATIC) set_hostname;;
-esac
« no previous file with comments | « dhcpcd-hooks/20-resolv.conf ('k') | dhcpcd-hooks/30-hostname » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698