[sr-dev] [kamailio/kamailio] kamailio v4.4.0-12.1 x86_64 RPM install user/group not added on Oracle Enterprise Linux 7.2 (#584)

Konstantin S. Vishnivetsky notifications at github.com
Wed Apr 27 06:30:57 CEST 2016


Hi, All.

This scriplet will not do what we need:

preinstall scriptlet (using /bin/sh):
**/usr/sbin/groupadd** -r kamailio 2> /dev/null || :
**/usr/sbin/useradd** -r -g kamailio -s /bin/false -c "Kamailio daemon" \
                  -d /var/run/kamailio kamailio 2> /dev/null || :

The cause is, that utils **groupadd** and **useradd** are located under **/sbin** directory in OEL7.x
Solution: to add an **if** statement to determine which path to use, like:
if [ -e /sbin/useradd ]; then ......; else .....; fi
or use RPM macro to determine which EL is actually used.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/584
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20160426/a0140c20/attachment.html>


More information about the sr-dev mailing list