Skip to content

Commit 1709792

Browse files
svenvogelyadvr
authored andcommitted
packaging: correct permissions in spec file and fix class path specified variable (#3030)
Install CentOS 7 e.g. Build 1804 and Java build 1.8.0_181 if you inspect systemd in debug mode you will see some errors 1. permission of the cloudstack-managment.service are not corretly set 2. invalid classpath specified. it seems the string which is used will be divided... we now we use ${..} like the lines above ... confused
1 parent 44bc516 commit 1709792

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packaging/centos7/cloud.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ pip install --upgrade /usr/share/cloudstack-marvin/Marvin-*.tar.gz
486486
%config(noreplace) %{_sysconfdir}/%{name}/management/environment.properties
487487
%config(noreplace) %{_sysconfdir}/%{name}/management/java.security.ciphers
488488
%config(noreplace) %{_sysconfdir}/%{name}/management/commons-logging.properties
489-
%attr(0755,root,root) %{_unitdir}/%{name}-management.service
489+
%attr(0644,root,root) %{_unitdir}/%{name}-management.service
490490
%attr(0755,cloud,cloud) %{_localstatedir}/run/%{name}-management.pid
491491
%attr(0755,root,root) %{_bindir}/%{name}-setup-management
492492
%attr(0755,root,root) %{_bindir}/%{name}-update-xenserver-licenses

packaging/systemd/cloudstack-management.service

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Environment="NAME=cloudstack-management"
2828
EnvironmentFile=/etc/default/cloudstack-management
2929
ExecStartPre=/bin/bash -c "/bin/systemctl set-environment JAVA_HOME=$( readlink -f $( which java ) | sed s:bin/.*$:: )"
3030
ExecStartPre=/bin/bash -c "/bin/systemctl set-environment JARS=$(ls /usr/share/cloudstack-management/lib/*.jar | tr '\n' ':' | sed s'/.$//')"
31-
ExecStart=/usr/bin/jsvc -home "${JAVA_HOME}" -user "${CLOUDSTACK_USER}" -cp "${JARS}:${CLASSPATH}" -errfile ${LOGDIR}/${NAME}.err -cwd ${LOGDIR} -pidfile "${CLOUDSTACK_PID}" ${JAVA_OPTS} "${BOOTSTRAP_CLASS}"
32-
ExecStop=/usr/bin/jsvc -cp "$JARS:$CLASSPATH" -pidfile "$CLOUDSTACK_PID" -stop "$BOOTSTRAP_CLASS"
31+
ExecStart=/usr/bin/jsvc -home "${JAVA_HOME}" -user "${CLOUDSTACK_USER}" -cp "${JARS}:${CLASSPATH}" -errfile "${LOGDIR}/${NAME}.err" -cwd "${LOGDIR}" -pidfile "${CLOUDSTACK_PID}" "${JAVA_OPTS}" "${BOOTSTRAP_CLASS}"
32+
ExecStop=/usr/bin/jsvc -cp "${JARS}:${CLASSPATH}" -pidfile "${CLOUDSTACK_PID}" -stop "${BOOTSTRAP_CLASS}"
3333
SuccessExitStatus=143
3434

3535
[Install]

0 commit comments

Comments
 (0)