mirror of
https://github.com/apache/nifi.git
synced 2025-02-17 15:36:36 +00:00
NIFI-3015 - This closes #1422. Corrects issue were RPM profile run.as property was not being used
This supersedes #1198
This commit is contained in:
parent
adfaffc773
commit
76e31dfd19
@ -485,6 +485,15 @@ language governing permissions and limitations under the License. -->
|
|||||||
<defaultFilemode>640</defaultFilemode>
|
<defaultFilemode>640</defaultFilemode>
|
||||||
<defaultUsername>nifi</defaultUsername>
|
<defaultUsername>nifi</defaultUsername>
|
||||||
<defaultGroupname>nifi</defaultGroupname>
|
<defaultGroupname>nifi</defaultGroupname>
|
||||||
|
<!-- This allows the stanza to produce bootstrap.conf that is pre-configured with run.as=nifi
|
||||||
|
given the uid is created by the preinstallScriptlet below. Meanwhile, normal zip and tar.gz
|
||||||
|
ship without this particular property set -->
|
||||||
|
<installScriptlet>
|
||||||
|
<!-- It is important to note because of the way the plugin calls the command, the sed backup
|
||||||
|
parameter -i and the sed command do not beed to be wrapped by single or double quotes.
|
||||||
|
Also note maven properties are processed before RPM variables and before sed commands -->
|
||||||
|
<script>sed -i s/^run\.as=$/run\.as=${nifi.run.as}/ $RPM_BUILD_ROOT/opt/nifi/nifi-${project.version}/conf/bootstrap.conf</script>
|
||||||
|
</installScriptlet>
|
||||||
<preinstallScriptlet>
|
<preinstallScriptlet>
|
||||||
<script>
|
<script>
|
||||||
/usr/bin/getent group nifi >/dev/null || /usr/sbin/groupadd -r nifi; /usr/bin/getent passwd nifi >/dev/null || /usr/sbin/useradd -r -g nifi -d /opt/nifi -s /sbin/nologin -c "NiFi System User" nifi
|
/usr/bin/getent group nifi >/dev/null || /usr/sbin/groupadd -r nifi; /usr/bin/getent passwd nifi >/dev/null || /usr/sbin/useradd -r -g nifi -d /opt/nifi -s /sbin/nologin -c "NiFi System User" nifi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user