- rhbz#631256 Only create db if asked to.
This commit is contained in:
parent
ce18607da4
commit
42a804b695
42
torque-create-request.patch
Normal file
42
torque-create-request.patch
Normal file
@ -0,0 +1,42 @@
|
||||
diff -uNr torque-2.5.2.ORIG/contrib/init.d/pbs_server torque-2.5.2/contrib/init.d/pbs_server
|
||||
--- torque-2.5.2.ORIG/contrib/init.d/pbs_server 2010-10-14 22:16:32.978386147 +0200
|
||||
+++ torque-2.5.2/contrib/init.d/pbs_server 2010-10-14 23:01:59.911917744 +0200
|
||||
@@ -25,11 +25,29 @@
|
||||
then
|
||||
daemon $PBS_DAEMON -d $PBS_HOME
|
||||
else
|
||||
+ echo -n "use \"service pbs_server create\"" && failure && echo && exit 5
|
||||
+ fi
|
||||
+ RET=$?
|
||||
+ [ $RET -eq 0 ] && touch /var/lock/subsys/pbs_server
|
||||
+ echo
|
||||
+ ;;
|
||||
+ create)
|
||||
+ echo -n "Creating Torque Server Database:... "
|
||||
+ if [ -r $PBS_HOME/server_priv/serverdb ]
|
||||
+ then
|
||||
+ echo -n "serverdb file allready exists?" && failure && echo && exit 5
|
||||
+ else
|
||||
daemon $PBS_DAEMON -t create -d $PBS_HOME
|
||||
fi
|
||||
RET=$?
|
||||
[ $RET -eq 0 ] && touch /var/lock/subsys/pbs_server
|
||||
echo
|
||||
+ sleep 3
|
||||
+ echo -n "Shutting down TORQUE Server: "
|
||||
+ killproc pbs_server
|
||||
+ RET=$?
|
||||
+ rm -f /var/lock/subsys/pbs_server
|
||||
+ echo
|
||||
;;
|
||||
stop)
|
||||
echo -n "Shutting down TORQUE Server: "
|
||||
@@ -53,7 +71,7 @@
|
||||
echo
|
||||
;;
|
||||
*)
|
||||
- echo "Usage: pbs_server {start|stop|restart|status|reload}"
|
||||
+ echo "Usage: pbs_server {start|stop|restart|status|reload|create}"
|
||||
exit 1
|
||||
esac
|
||||
exit $RET
|
@ -68,7 +68,7 @@
|
||||
|
||||
Name: torque
|
||||
Version: 2.5.2
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Tera-scale Open-source Resource and QUEue manager
|
||||
Source0: http://www.clusterresources.com/downloads/%{name}/%{name}-%{version}.tar.gz
|
||||
Source2: xpbs.desktop
|
||||
@ -80,6 +80,8 @@ Source7: pbs-config-multilib
|
||||
Source8: config
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=528060
|
||||
Patch0: torque-cond-touch.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=631256
|
||||
Patch1: torque-create-request.patch
|
||||
License: OpenPBS
|
||||
Group: System Environment/Daemons
|
||||
URL: http://www.clusterresources.com/products/torque/
|
||||
@ -267,6 +269,7 @@ This package holds the server.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
install -pm 644 %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} \
|
||||
%{SOURCE6} %{SOURCE7} %{SOURCE8} .
|
||||
# rm x bit on some documentation.
|
||||
@ -648,6 +651,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Oct 14 2010 Steve Traylen <steve.traylen@cern.ch> - 2.5.2-3
|
||||
- rhbz#631256 Only create db if asked to.
|
||||
|
||||
* Thu Oct 14 2010 Steve Traylen <steve.traylen@cern.ch> - 2.5.2-2
|
||||
- rhbz#58060, add torque-cond-touch.spec to only touch files
|
||||
when service actually starts.
|
||||
|
Loading…
Reference in New Issue
Block a user