<p>Hi, All.</p>

<p>This scriplet will not do what we need:</p>

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

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

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/584">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZX1JOYqTPfc0KaVyZ8Aa0HNU3wTGks5p7uaBgaJpZM4IQl2L.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/584"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>