]> git.pld-linux.org Git - packages/FreeWnn.git/commitdiff
- revert user changes
authorpascalek <pascalek@pld-linux.org>
Sat, 17 May 2003 06:51:39 +0000 (06:51 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    FreeWnn.spec -> 1.8

FreeWnn.spec

index ade8aca23cc746208685e34b69739b987faf16a1..916cf358a1780487dbd1a741bbd587580c95a5e4 100644 (file)
@@ -90,7 +90,11 @@ Statyczna wersja biblioteki FreeWnn.
 Summary:       Common files for Wnn
 Summary(pl):   Wspólne pliki Wnn
 Group:         Applications/System
-Requires(pre): user-wnn
+Requires(pre): /bin/id
+Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
+Requires(postun):      /usr/sbin/userdel
+Requires(postun):      /usr/sbin/groupdel
 
 %description common
 FreeWnn-common includes the files you need to run FreeWnn, cWnn or
@@ -360,6 +364,30 @@ fi
 %post  -n kWnn-libs -p /sbin/ldconfig
 %postun        -n kWnn-libs -p /sbin/ldconfig
 
+%pre common
+if [ -n "`getgid wnn`" ]; then
+       if [ "`getgid wnn`" != "42" ]; then
+               echo "Warning: group wnn doesn't have gid=42. Correct this before installing FreeWnn." 1>&2
+               exit 1
+       fi
+else
+       /usr/sbin/groupadd -g 42 -r -f wnn
+fi
+if [ -n "`id -u wnn 2>/dev/null`" ]; then
+       if [ "`id -u wnn`" != "42" ]; then
+               echo "Warning: user wnn doesn't have uid=42. Correct this before installing FreeWnn." 1>&2
+               exit 1
+       fi
+else
+       /usr/sbin/useradd -M -u 42 -c "Wnn Service User" -g wnn -s /bin/false wnn 1>&2
+fi
+
+%postun common
+if [ "$1" = "0" ]; then
+       /usr/sbin/userdel wnn
+       /usr/sbin/groupdel wnn
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc Contrib/dic/gerodic/GERODIC PubdicPlus/PUBDICPLUS-README
This page took 0.14287 seconds and 4 git commands to generate.