From b2c353d874b85e06f355a9419852e2616613c7d0 Mon Sep 17 00:00:00 2001 From: Parabola Date: Fri, 4 May 2012 20:00:41 +0000 Subject: Fri May 4 20:00:31 UTC 2012 --- ...et-hostname-via-proc-if-file-is-available.patch | 33 ---------------------- 1 file changed, 33 deletions(-) delete mode 100644 testing/dhcpcd/0001-Set-hostname-via-proc-if-file-is-available.patch (limited to 'testing/dhcpcd/0001-Set-hostname-via-proc-if-file-is-available.patch') diff --git a/testing/dhcpcd/0001-Set-hostname-via-proc-if-file-is-available.patch b/testing/dhcpcd/0001-Set-hostname-via-proc-if-file-is-available.patch deleted file mode 100644 index 4420d0b63..000000000 --- a/testing/dhcpcd/0001-Set-hostname-via-proc-if-file-is-available.patch +++ /dev/null @@ -1,33 +0,0 @@ -From d345b36b483fec8fb2def5f3acdc2d3c5faa94eb Mon Sep 17 00:00:00 2001 -From: Dan McGee -Date: Sun, 19 Jun 2011 16:04:25 -0500 -Subject: [PATCH] Set hostname via /proc if file is available - -On Linux, the hostname can be set via this file if available, precluding -the need for a `hostname` binary. - -Signed-off-by: Dan McGee ---- - dhcpcd-hooks/30-hostname | 6 +++++- - 1 files changed, 5 insertions(+), 1 deletions(-) - -diff --git a/dhcpcd-hooks/30-hostname b/dhcpcd-hooks/30-hostname -index 65d1a13..af94262 100644 ---- a/dhcpcd-hooks/30-hostname -+++ b/dhcpcd-hooks/30-hostname -@@ -21,7 +21,11 @@ need_hostname() - try_hostname() - { - if valid_domainname "$1"; then -- hostname "$1" -+ if [ -w /proc/sys/kernel/hostname ]; then -+ echo "$1" > /proc/sys/kernel/hostname -+ else -+ hostname "$1" -+ fi - else - syslog err "Invalid hostname: $1" - fi --- -1.7.5.4 - -- cgit v1.2.3-54-g00ecf