Loading xCAT-server/usr/lib/systemd/system/xcatd.service 0 → 100644 +12 −0 Original line number Diff line number Diff line [Unit] Description=xCAT Management Service After=network.target syslog.target sshd.service [Service] Type=forking EnvironmentFile=-/etc/sysconfig/xcat ExecStart=/opt/xcat/sbin/xcatd -p /var/run/xcatd.pid PIDFile=/var/run/xcatd.pid [Install] WantedBy=multi-user.target xCAT-server/xCAT-server.spec +40 −7 Original line number Diff line number Diff line Loading @@ -55,6 +55,16 @@ Requires: xCAT-client >= %{epoch}:%(cat Version|cut -d. -f 1,2) Provides: xCAT-server = %{epoch}:%{version} %if 0%{!?initscripttype:1} # initscripttype not explicitly defined in some macro file or on commandline # use presence of systemd_post macro to determine the initscripttype %if %{?systemd_post:1}%{!?systemd_post:0} %global initscripttype systemd %else %global initscripttype sysv %endif %endif %description xCAT-server provides the core server and configuration management components of xCAT. This package should be installed on your management server Loading Loading @@ -128,8 +138,6 @@ chmod -h 755 $RPM_BUILD_ROOT/%{prefix}/sbin/* cp -h bin/* $RPM_BUILD_ROOT/%{prefix}/bin chmod -h 755 $RPM_BUILD_ROOT/%{prefix}/bin/* %endif #cp rc.d/* $RPM_BUILD_ROOT/%{prefix}/rc.d #chmod 755 $RPM_BUILD_ROOT/%{prefix}/rc.d/* cp share/xcat/ca/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/ca chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/xcat/ca/* Loading Loading @@ -217,7 +225,6 @@ rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/aixinstall.pm rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/slpdiscover.pm rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/remoteimmsetup.pm rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/IMMUtils.pm #rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/RShellAPI.pm rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/bmcconfig.pm rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/bpa.pm rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/esx.pm Loading Loading @@ -313,9 +320,14 @@ cp lib/xcat/shfunctions $RPM_BUILD_ROOT/%{prefix}/lib chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/shfunctions %if %fsm %else %if %{initscripttype} == "systemd" mkdir -p $RPM_BUILD_ROOT/usr/lib/systemd/system cp usr/lib/systemd/system/xcatd.service $RPM_BUILD_ROOT/usr/lib/systemd/system %else mkdir -p $RPM_BUILD_ROOT/etc/init.d cp etc/init.d/xcatd $RPM_BUILD_ROOT/etc/init.d %endif %endif #TODO: the next has to me moved to postscript, to detect /etc/xcat vs /etc/opt/xcat mkdir -p $RPM_BUILD_ROOT/etc/xcat Loading Loading @@ -369,7 +381,11 @@ rm -rf $RPM_BUILD_ROOT /etc/xcat %if %fsm %else %if %{initscripttype} == "systemd" /usr/lib/systemd/system/xcatd.service %else /etc/init.d/xcatd %endif #/etc/xcat/conf.orig/xcat-ws.conf.apache24 #/etc/xcat/conf.orig/xcat-ws.conf.apache22 /etc/apache2/conf.d/xcat-ws.conf Loading @@ -377,6 +393,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog * Thu Jun 11 2015 - Arif Ali <aali@ocf.co.uk> - Add systemd support * Fri Nov 20 2007 - Jarrod Johnson <jbjohnso@us.ibm.com> - Changes for relocatible rpm. Loading Loading @@ -410,6 +429,9 @@ if [ "$1" = "1" ]; then #Only if installing for the first time.. /usr/lib/lsb/install_initd /etc/init.d/xcatd elif [ -x /sbin/chkconfig ]; then /sbin/chkconfig --add xcatd elif [ -x /usr/bin/systemctl ]; then /usr/bin/systemctl daemon-reload /usr/bin/systemctl enable xcatd else echo "Unable to register init scripts on this system" fi Loading Loading @@ -460,9 +482,20 @@ if [ $1 == 0 ]; then #This means only on -e /usr/lib/lsb/remove_initd /etc/init.d/xcatd elif [ -x /sbin/chkconfig ]; then /sbin/chkconfig --del xcatd elif [ -x /usr/bin/systemctl ]; then /usr/bin/systemctl daemon-reload /usr/bin/systemctl disable xcatd fi rm -f /usr/sbin/xcatd #remove the symbolic fi %endif %postun %ifos linux if [ $1 == 0 ]; then #This means only on -e if [ -x /usr/bin/systemctl ]; then /usr/bin/systemctl daemon-reload fi fi Loading
xCAT-server/usr/lib/systemd/system/xcatd.service 0 → 100644 +12 −0 Original line number Diff line number Diff line [Unit] Description=xCAT Management Service After=network.target syslog.target sshd.service [Service] Type=forking EnvironmentFile=-/etc/sysconfig/xcat ExecStart=/opt/xcat/sbin/xcatd -p /var/run/xcatd.pid PIDFile=/var/run/xcatd.pid [Install] WantedBy=multi-user.target
xCAT-server/xCAT-server.spec +40 −7 Original line number Diff line number Diff line Loading @@ -55,6 +55,16 @@ Requires: xCAT-client >= %{epoch}:%(cat Version|cut -d. -f 1,2) Provides: xCAT-server = %{epoch}:%{version} %if 0%{!?initscripttype:1} # initscripttype not explicitly defined in some macro file or on commandline # use presence of systemd_post macro to determine the initscripttype %if %{?systemd_post:1}%{!?systemd_post:0} %global initscripttype systemd %else %global initscripttype sysv %endif %endif %description xCAT-server provides the core server and configuration management components of xCAT. This package should be installed on your management server Loading Loading @@ -128,8 +138,6 @@ chmod -h 755 $RPM_BUILD_ROOT/%{prefix}/sbin/* cp -h bin/* $RPM_BUILD_ROOT/%{prefix}/bin chmod -h 755 $RPM_BUILD_ROOT/%{prefix}/bin/* %endif #cp rc.d/* $RPM_BUILD_ROOT/%{prefix}/rc.d #chmod 755 $RPM_BUILD_ROOT/%{prefix}/rc.d/* cp share/xcat/ca/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/ca chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/xcat/ca/* Loading Loading @@ -217,7 +225,6 @@ rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/aixinstall.pm rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/slpdiscover.pm rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/remoteimmsetup.pm rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/IMMUtils.pm #rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/RShellAPI.pm rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/bmcconfig.pm rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/bpa.pm rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/esx.pm Loading Loading @@ -313,9 +320,14 @@ cp lib/xcat/shfunctions $RPM_BUILD_ROOT/%{prefix}/lib chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/shfunctions %if %fsm %else %if %{initscripttype} == "systemd" mkdir -p $RPM_BUILD_ROOT/usr/lib/systemd/system cp usr/lib/systemd/system/xcatd.service $RPM_BUILD_ROOT/usr/lib/systemd/system %else mkdir -p $RPM_BUILD_ROOT/etc/init.d cp etc/init.d/xcatd $RPM_BUILD_ROOT/etc/init.d %endif %endif #TODO: the next has to me moved to postscript, to detect /etc/xcat vs /etc/opt/xcat mkdir -p $RPM_BUILD_ROOT/etc/xcat Loading Loading @@ -369,7 +381,11 @@ rm -rf $RPM_BUILD_ROOT /etc/xcat %if %fsm %else %if %{initscripttype} == "systemd" /usr/lib/systemd/system/xcatd.service %else /etc/init.d/xcatd %endif #/etc/xcat/conf.orig/xcat-ws.conf.apache24 #/etc/xcat/conf.orig/xcat-ws.conf.apache22 /etc/apache2/conf.d/xcat-ws.conf Loading @@ -377,6 +393,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog * Thu Jun 11 2015 - Arif Ali <aali@ocf.co.uk> - Add systemd support * Fri Nov 20 2007 - Jarrod Johnson <jbjohnso@us.ibm.com> - Changes for relocatible rpm. Loading Loading @@ -410,6 +429,9 @@ if [ "$1" = "1" ]; then #Only if installing for the first time.. /usr/lib/lsb/install_initd /etc/init.d/xcatd elif [ -x /sbin/chkconfig ]; then /sbin/chkconfig --add xcatd elif [ -x /usr/bin/systemctl ]; then /usr/bin/systemctl daemon-reload /usr/bin/systemctl enable xcatd else echo "Unable to register init scripts on this system" fi Loading Loading @@ -460,9 +482,20 @@ if [ $1 == 0 ]; then #This means only on -e /usr/lib/lsb/remove_initd /etc/init.d/xcatd elif [ -x /sbin/chkconfig ]; then /sbin/chkconfig --del xcatd elif [ -x /usr/bin/systemctl ]; then /usr/bin/systemctl daemon-reload /usr/bin/systemctl disable xcatd fi rm -f /usr/sbin/xcatd #remove the symbolic fi %endif %postun %ifos linux if [ $1 == 0 ]; then #This means only on -e if [ -x /usr/bin/systemctl ]; then /usr/bin/systemctl daemon-reload fi fi