[packages/mfs] Adding the default user for chunkserver and metalogger

baggins baggins at pld-linux.org
Mon Oct 15 12:02:36 CEST 2012


commit 35cafcbe9fc15ce4d0b2ea16d93fd626c06b53e3
Author: Paweł Kośka <pawel at viop.pl>
Date:   Mon Oct 15 11:05:14 2012 +0200

    Adding the default user for chunkserver and metalogger
    
    Signed-off-by: Jan Rękorajski <baggins at pld-linux.org>

 mfs.spec | 39 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 38 insertions(+), 1 deletion(-)
---
diff --git a/mfs.spec b/mfs.spec
index 002f8e5..a80e010 100644
--- a/mfs.spec
+++ b/mfs.spec
@@ -27,7 +27,12 @@ operacyjnych zgodnych z POSIX
 Summary:	MooseFS master server
 Summary(pl.UTF-8):	Serwer zarządzający MooseFS
 Group:		Daemons
-
+Requires(pre):	/usr/sbin/groupadd
+Requires(pre):	/usr/sbin/useradd
+Requires(postun):	/usr/sbin/groupdel
+Requires(postun):	/usr/sbin/userdel
+Provides:	group(mfs)
+Provides:	user(mfs)
 %description master
 MooseFS master (metadata) server together with metarestore utility.
 
@@ -39,6 +44,12 @@ metarestore.
 Summary:	MooseFS metalogger server
 Summary(pl.UTF-8):	Serwer metaloggera MooseFS
 Group:		Daemons
+Requires(pre):	/usr/sbin/groupadd
+Requires(pre):	/usr/sbin/useradd
+Requires(postun):	/usr/sbin/groupdel
+Requires(postun):	/usr/sbin/userdel
+Provides:	group(mfs)
+Provides:	user(mfs)
 
 %description metalogger
 MooseFS metalogger (metadata replication) server.
@@ -50,6 +61,12 @@ Serwer metaloggera (replikacji metadanych) MooseFS.
 Summary:	MooseFS data server
 Summary(pl.UTF-8):	Serwer danych MooseFS
 Group:		Daemons
+Requires(pre):	/usr/sbin/groupadd
+Requires(pre):	/usr/sbin/useradd
+Requires(postun):	/usr/sbin/groupdel
+Requires(postun):	/usr/sbin/userdel
+Provides:	group(mfs)
+Provides:	user(mfs)
 
 %description chunkserver
 MooseFS data server.
@@ -114,6 +131,26 @@ if [ "$1" = "0" ]; then
 	%groupremove mfs
 fi
 
+%pre metalogger
+%groupadd -g 282 mfs
+%useradd -u 282 -d /var/mfs -s /bin/false -c "MooseFS pseudo user" -g mfs mfs
+
+%postun metalogger
+if [ "$1" = "0" ]; then
+	%userremove mfs
+	%groupremove mfs
+fi
+
+%pre chunkserver
+%groupadd -g 282 mfs
+%useradd -u 282 -d /var/mfs -s /bin/false -c "MooseFS pseudo user" -g mfs mfs
+
+%postun chunkserver
+if [ "$1" = "0" ]; then
+	%userremove mfs
+	%groupremove mfs
+fi
+
 %files master
 %defattr(644,root,root,755)
 %doc NEWS README UPGRADE
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mfs.git/commitdiff/ef1c28b868e741a21e01ccb8e24a452583cee4b0



More information about the pld-cvs-commit mailing list