From 3a608519b697426d5267688bbad5d4bf63f10145 Mon Sep 17 00:00:00 2001 From: Robby Workman Date: Tue, 22 Jun 2010 05:59:12 -0500 Subject: network/NetworkManager: Hackery to set static hostname MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem reported by Fırat Birlik on the NM mailing list: http://mail.gnome.org/archives/networkmanager-list/2010-June/msg00105.html Signed-off-by: Robby Workman --- network/NetworkManager/NetworkManager.SlackBuild | 2 +- network/NetworkManager/doinst.sh | 5 +++++ network/NetworkManager/nm-system-settings.conf.new | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'network') diff --git a/network/NetworkManager/NetworkManager.SlackBuild b/network/NetworkManager/NetworkManager.SlackBuild index 39d45a4c52..efdbf44b12 100644 --- a/network/NetworkManager/NetworkManager.SlackBuild +++ b/network/NetworkManager/NetworkManager.SlackBuild @@ -24,7 +24,7 @@ PRGNAM=NetworkManager VERSION=${VERSION:-0.8} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} # Automatically determine the architecture we're building on: diff --git a/network/NetworkManager/doinst.sh b/network/NetworkManager/doinst.sh index 9179f3cddc..39b8957282 100644 --- a/network/NetworkManager/doinst.sh +++ b/network/NetworkManager/doinst.sh @@ -22,6 +22,11 @@ preserve_perms() { config ${NEW} } +if [ -e etc/HOSTNAME ]; then + sed -i "s,yourhostname,$(cat etc/HOSTNAME | cut -f1 -d .)," \ + etc/NetworkManager/nm-system-settings.conf.new +fi + preserve_perms etc/rc.d/rc.networkmanager.new config etc/NetworkManager/nm-system-settings.conf.new diff --git a/network/NetworkManager/nm-system-settings.conf.new b/network/NetworkManager/nm-system-settings.conf.new index c37b596800..eca86b84f8 100644 --- a/network/NetworkManager/nm-system-settings.conf.new +++ b/network/NetworkManager/nm-system-settings.conf.new @@ -1,2 +1,6 @@ [main] plugins=keyfile + +[keyfile] +hostname=yourhostname + -- cgit v1.2.3