[smstools/f14/master] added if clause for deciding between uucp and dialout group (BZ#605211)
Patrick Charles François Ernzer
pcfe at fedoraproject.org
Mon Feb 7 12:40:26 UTC 2011
commit 4ff4c79e01061b9c2d43843f2aa696ec03b84922
Author: Patrick C. F. Ernzer <pcfe at redhat.com>
Date: Mon Feb 7 14:30:43 2011 +0200
added if clause for deciding between uucp and dialout group (BZ#605211)
smstools.spec | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/smstools.spec b/smstools.spec
index 715d72d..08b70fb 100644
--- a/smstools.spec
+++ b/smstools.spec
@@ -2,7 +2,7 @@
Name: smstools
Version: 3.1.8
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Tools to send and receive short messages through GSM modems or mobile phones
License: GPLv2+
@@ -64,7 +64,17 @@ rm -rf $RPM_BUILD_ROOT
%pre
getent group smstools >/dev/null || groupadd -r smstools
-getent passwd smstools >/dev/null || useradd -r -d /var/lib/smstools -m -g smstools -G uucp smstools
+
+# on older releases we need to use uucp (here it seems only the uucp group exists)
+# on newer releases it's dialout (here it seems both groups exist)
+# it would be more elegant to base my if clause on the udev rules instead of the group existence
+if [ `getent group dialout` ]
+ then
+ getent passwd smstools >/dev/null || useradd -r -d /var/lib/smstools -m -g smstools -G dialout smstools
+ else
+ getent passwd smstools >/dev/null || useradd -r -d /var/lib/smstools -m -g smstools -G uucp smstools
+fi
+
%post
if [ $1 -eq 0 ]; then
@@ -110,6 +120,9 @@ fi
%attr(0750,smstools,smstools) %dir %{_varlogdir}/smsd_stats
%changelog
+* Thu Jan 20 2011 Patrick C. F. Ernzer <smstools.spec at pcfe.net> 3.1.8-2
+- added if clause for deciding between uucp and dialout group (BZ#605211)
+
* Mon May 31 2010 Marek Mahut <mmahut at fedoraproject.org> 3.1.8-1
- New upstream release
More information about the scm-commits
mailing list