[Frugalware-git] gnometesting: networkmanager-0.8.3.996-3-i686 *use real hostname

bouleetbil bouleetbil at frogdev.info
Sat Mar 5 20:09:34 CET 2011


Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=gnometesting.git;a=commitdiff;h=70829abe53c65b55c73c89e0ed8413b3b8f4e3e3

commit 70829abe53c65b55c73c89e0ed8413b3b8f4e3e3
Author: bouleetbil <bouleetbil at frogdev.info>
Date:   Sat Mar 5 20:06:18 2011 +0100

networkmanager-0.8.3.996-3-i686
*use real hostname

diff --git a/source/network/networkmanager/FrugalBuild b/source/network/networkmanager/FrugalBuild
index f652ba5..c8af972 100644
--- a/source/network/networkmanager/FrugalBuild
+++ b/source/network/networkmanager/FrugalBuild
@@ -4,7 +4,7 @@
pkgname=networkmanager
_F_gnome_name=NetworkManager
pkgver=0.8.3.996
-pkgrel=2
+pkgrel=3
pkgdesc="Network Management daemon"
depends=('wireless_tools' 'hal' 'iproute2' 'dhcpcd>=5.1.3' 'nss' \
'libnl' 'ppp' 'wpa_supplicant' 'iptables' 'polkit' 'libgudev')
@@ -18,7 +18,7 @@ source=($source \
nm-system-settings.conf \
dbus-acces.diff)
sha1sums=('d00205aa87ffd99b3749bffc86ddb5d8cf5f22dc' \
-          'a7852601e312691e7b1d20e0935f989135ba509f' \
+          '5a7c9957783a275692101e5471022056cff6f096' \
'7cfbc5ae73f64ec47fade7b089535c7acbe1eb3e')
_F_cd_path=$_F_gnome_name-$pkgver

diff --git a/source/network/networkmanager/networkmanager.install b/source/network/networkmanager/networkmanager.install
index a287470..9dc2970 100644
--- a/source/network/networkmanager/networkmanager.install
+++ b/source/network/networkmanager/networkmanager.install
@@ -1,11 +1,21 @@
+update_host()
+{
+	host=`cat /etc/HOSTNAME`
+	if [ "`grep frugalwarehostname /etc/NetworkManager/nm-system-settings.conf`" != "" ]; then
+		echo "updating hostname NetworkManager with $host"
+		sed -i "/hostname/s/frugalwarehostname/$host/" /etc/NetworkManager/nm-system-settings.conf
+	fi
+}
post_install()
{
+	update_host
systemctl daemon-reload >/dev/null 2>&1
systemctl enable NetworkManager.service >/dev/null 2>&1
}

post_upgrade()
{
+	update_host
systemctl daemon-reload >/dev/null 2>&1
systemctl try-restart NetworkManager.service >/dev/null 2>&1
systemctl enable NetworkManager.service >/dev/null 2>&1
diff --git a/source/network/networkmanager/nm-system-settings.conf b/source/network/networkmanager/nm-system-settings.conf
index 2f2c529..2b55976 100644
--- a/source/network/networkmanager/nm-system-settings.conf
+++ b/source/network/networkmanager/nm-system-settings.conf
@@ -1,4 +1,4 @@
[main]
plugins=keyfile
[keyfile]
-
+hostname = frugalwarehostname


More information about the Frugalware-git mailing list