add some hacks to manipulate services better
This commit is contained in:
parent
f33e61098f
commit
a617210d68
31
torque.spec
31
torque.spec
@ -71,7 +71,7 @@
|
||||
|
||||
Name: torque
|
||||
Version: 4.2.10
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Tera-scale Open-source Resource and QUEue manager
|
||||
Source0: http://www.adaptivecomputing.com/download/%{name}/%{name}-%{version}.tar.gz
|
||||
Source2: xpbs.desktop
|
||||
@ -135,6 +135,8 @@ BuildRequires: tetex-latex
|
||||
%endif
|
||||
%endif
|
||||
|
||||
Requires(post): /bin/grep /etc/services
|
||||
|
||||
%description
|
||||
TORQUE (Tera-scale Open-source Resource and QUEue manager) is a resource
|
||||
manager providing control over batch jobs and distributed compute nodes.
|
||||
@ -496,21 +498,17 @@ EOF
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%post
|
||||
if grep -q "PBS services" /etc/services;then
|
||||
: PBS services already installed
|
||||
else
|
||||
cat<<__EOF__>>/etc/services
|
||||
# Standard PBS services
|
||||
pbs 15001/tcp # pbs server (pbs_server)
|
||||
pbs 15001/udp # pbs server (pbs_server)
|
||||
pbs_mom 15002/tcp # mom to/from server
|
||||
pbs_mom 15002/udp # mom to/from server
|
||||
pbs_resmom 15003/tcp # mom resource management requests
|
||||
pbs_resmom 15003/udp # mom resource management requests
|
||||
pbs_sched 15004/tcp # scheduler
|
||||
pbs_sched 15004/udp # scheduler
|
||||
for srvs in pbs:15001 pbs_mon:15002 pbs_resmom:15003 pbs_sched:15004 ; do
|
||||
port=${srvs/*:/}
|
||||
srvs=${srvs/:*/}
|
||||
for proto in tcp udp ; do
|
||||
if ! grep -q $srvs'\W\W*'$port'/'$proto /etc/services;then
|
||||
cat<<__EOF__>>/etc/services
|
||||
$srvs $port/$proto
|
||||
__EOF__
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
%posttrans client
|
||||
/usr/sbin/alternatives --install %{_bindir}/qsub qsub %{_bindir}/qsub-torque 10 \
|
||||
@ -815,6 +813,9 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Apr 24 2015 David Brown <david.brown@pnnl.gov> - 4.2.10-2
|
||||
- Bugfix - #1154413 make manipulating services better.
|
||||
|
||||
* Mon Apr 6 2015 David Brown <david.brown@pnnl.gov> - 4.2.10-1
|
||||
- Updated upstream version
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user