Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #4704: AIX service management for rudder-agent has some bugs #296

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions rudder-agent/SPECS/rudder-agent.spec
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ if [ $1 -eq 1 ]
then
# Set rudder-agent as service
%if "%{?_os}" == "aix"
mkssys -s rudder-agent -p %{ruddervardir}/cfengine-community/bin/cf-execd -u root -S -n15 -f9
echo "rudder-agent:23456789:respawn:/usr/bin/startsrc -s rudder-agent" >> /etc/inittab
/usr/bin/mkssys -s rudder-agent -p %{ruddervardir}/cfengine-community/bin/cf-execd -a "-F" -u root -S -n15 -f9 -R
/usr/sbin/mkitab "rudder-agent:23456789:once:/usr/bin/startsrc -s rudder-agent"
# No need to tell init to re-read /etc/inittab, it does it automatically every 60 seconds
%else
/sbin/chkconfig --add rudder-agent
Expand Down Expand Up @@ -462,15 +462,23 @@ then
echo "rudder-agent has been updated, but was not started as it is disabled."
echo "To enable rudder agent, you have to remove disable file, and start rudder-agent:"
echo "# rm -f /opt/rudder/etc/disable-agent"
%if "%{?_os}" == "aix"
echo "# startsrc -s rudder-agent"
%else
echo "# /sbin/service rudder-agent start"
%endif
echo "********************************************************************************"
fi
else
echo "********************************************************************************"
echo "rudder-agent has been installed (not started). This host can be a Rudder node."
echo "To get started, configure your Rudder server's hostname and launch the agent:"
echo "# echo 'rudder.server' > /var/rudder/cfengine-community/policy_server.dat"
%if "%{?_os}" == "aix"
echo "# startsrc -s rudder-agent"
%else
echo "# service rudder-agent start"
%endif
echo "This node will then appear in the Rudder web interface under 'Accept new nodes'."
echo "********************************************************************************"
fi
Expand Down