SPECS: NetworkManager.spec - init script added

patrys patrys at pld-linux.org
Tue Dec 27 14:57:06 CET 2005


Author: patrys                       Date: Tue Dec 27 13:57:06 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- init script added

---- Files affected:
SPECS:
   NetworkManager.spec (1.6 -> 1.7) 

---- Diffs:

================================================================
Index: SPECS/NetworkManager.spec
diff -u SPECS/NetworkManager.spec:1.6 SPECS/NetworkManager.spec:1.7
--- SPECS/NetworkManager.spec:1.6	Tue Dec 27 13:40:43 2005
+++ SPECS/NetworkManager.spec	Tue Dec 27 14:57:00 2005
@@ -13,6 +13,7 @@
 Group:		X11/Applications
 Source0:	http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/0.5/%{name}-%{version}.tar.bz2
 # Source0-md5:	3bf0266bf9d1caa7b5962a996a74c1f1
+Source1:	%{name}.init
 Patch0:		%{name}-pld.patch
 BuildRequires:	dbus-glib-devel >= 0.33
 BuildRequires:	dhcdbd
@@ -40,15 +41,39 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/NetworkManager
+
 %find_lang %{name} --with-gnome --all-name
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+/sbin/ldconfig
+%gconf_schema_install
+/sbin/chkconfig --add NetworkManager
+if [ -f /var/lock/subsys/NetworkManager ]; then
+	/etc/rc.d/init.d/dhcdbd restart 1>&2
+else
+	echo "Run \"/etc/rc.d/init.d/NetworkManager start\" to start NetworkManager daemon."
+fi
+
+%preun
+if [ "$1" = "0" ]; then
+	if [ -f /var/lock/subsys/NetworkManager ]; then
+		/etc/rc.d/init.d/NetworkManager stop 1>&2
+	fi
+	[ ! -x /sbin/chkconfig ] || /sbin/chkconfig --del NetworkManager
+fi
+
+%postun
+/sbin/ldconfig
+
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog NEWS README TODO
@@ -56,7 +81,7 @@
 %attr(755,root,root) %{_datadir}/nm-applet
 %attr(755,root,root) %{_datadir}/gnome-vpn-properties
 %attr(755,root,root) %{_libdir}/lib*so.*
-#%{_datadir}/NetworkManager*
+%attr(754,root,root) /etc/rc.d/init.d/NetworkManager
 %{_sysconfdir}/dbus-1/system.d/*
 %{_iconsdir}/*/*/apps/*.png
 
@@ -66,6 +91,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.7  2005/12/27 13:57:00  patrys
+- init script added
+
 Revision 1.6  2005/12/27 12:40:43  patrys
 - up to 0.5.1
 - reimplemented the PLD backend
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/NetworkManager.spec?r1=1.6&r2=1.7&f=u



More information about the pld-cvs-commit mailing list