From 87b69242f9581d2b52f96e3ba0ef2376ed48b531 Mon Sep 17 00:00:00 2001
From: Andrew McNab <andrew.mcnab@cern.ch>
Date: Sun, 28 Feb 2016 03:29:23 +0000
Subject: [PATCH] 00.02

---
 VERSION         | 2 +-
 mjf-torque.init | 3 ++-
 mjf-torque.spec | 7 +++++--
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/VERSION b/VERSION
index 1ace5ea..3433761 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-VERSION=00.01
+VERSION=00.02
diff --git a/mjf-torque.init b/mjf-torque.init
index dc123f0..a3a4e90 100755
--- a/mjf-torque.init
+++ b/mjf-torque.init
@@ -33,7 +33,8 @@ start() {
 
         # Create files
         echo -n $"Set up /etc/machinefeatures: "
-        
+
+        rm -Rf /etc/machinefeatures
         mkdir -p /etc/machinefeatures
 
         if [ "$total_cpu" == "" ] ; then
diff --git a/mjf-torque.spec b/mjf-torque.spec
index 24fda81..f27eed2 100644
--- a/mjf-torque.spec
+++ b/mjf-torque.spec
@@ -26,8 +26,11 @@ chkconfig mjf-torque on
 service mjf-torque start
 
 %preun
-chkconfig mjf-torque off
-service mjf-torque stop
+if [ "$1" = "0" ] ; then
+  # if uninstallation rather than upgrade then stop
+  chkconfig mjf-torque off
+  service mjf-torque stop
+fi
 
 %files
 /var/lib/torque/mom_priv
-- 
GitLab