SPECS: nps.spec - tabs

glen glen at pld-linux.org
Thu Apr 20 19:08:04 CEST 2006


Author: glen                         Date: Thu Apr 20 17:08:04 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- tabs

---- Files affected:
SPECS:
   nps.spec (1.9 -> 1.10) 

---- Diffs:

================================================================
Index: SPECS/nps.spec
diff -u SPECS/nps.spec:1.9 SPECS/nps.spec:1.10
--- SPECS/nps.spec:1.9	Sun Sep 25 22:04:31 2005
+++ SPECS/nps.spec	Thu Apr 20 19:07:59 2006
@@ -56,36 +56,32 @@
 sed -i -e "s/<SWInstalledDate>.*</<SWInstalledDate>`date +%s`</" /etc/newisys/jnet/swinventory.xml
 
 if [ -e /etc/newisys/nws_mc/swinventory.xml ] ; then
-  sed -i -e "s/<SWInstalledDate>.*</<SWInstalledDate>`date +%s`</" /etc/newisys/nws_mc/swinventory.xml
+	sed -i -e "s/<SWInstalledDate>.*</<SWInstalledDate>`date +%s`</" /etc/newisys/nws_mc/swinventory.xml
 fi
 
 # need to add a file for JNET's ip address
-if [ ! -f /etc/newisys/jnet/jnet.conf ]
-then
-  mkdir -p /etc/newisys/jnet
-  echo "169.254.101.2" >/etc/newisys/jnet/jnet.conf
-  chmod 600 /etc/newisys/jnet/jnet.conf
+if [ ! -f /etc/newisys/jnet/jnet.conf ]; then
+	mkdir -p /etc/newisys/jnet
+	echo "169.254.101.2" >/etc/newisys/jnet/jnet.conf
+	chmod 600 /etc/newisys/jnet/jnet.conf
 fi
 
-if ! lsmod | grep -q ^jnet
-then
-  # now add poci
-  # this must be an install, so add poci
-  /sbin/chkconfig --add poci
-
-  # this is needed to run poci after an install without having to reboot
-  if ( uname -r | grep -q "2.4.2[01]-" )
-  then
-    route del -net 169.254.0.0 gw 0 netmask 255.255.0.0 dev eth0 1>/dev/null 2>/dev/null
-    route del -net 169.254.0.0 gw 0 netmask 255.255.0.0 dev eth1 1>/dev/null 2>/dev/null
-  fi
+if ! lsmod | grep -q ^jnet; then
+	# now add poci
+	# this must be an install, so add poci
+	/sbin/chkconfig --add poci
+
+	# this is needed to run poci after an install without having to reboot
+	if ( uname -r | grep -q "2.4.2[01]-" ); then
+		route del -net 169.254.0.0 gw 0 netmask 255.255.0.0 dev eth0 1>/dev/null 2>/dev/null
+		route del -net 169.254.0.0 gw 0 netmask 255.255.0.0 dev eth1 1>/dev/null 2>/dev/null
+	fi
 fi
 
 # need to add to /etc/hosts
 # 169.254.101.2  sp.D332B385-5567-42e9-8D66-545897E8120A
-if ! grep -q "169.254.101.2.*sp" /etc/hosts
-then
-  echo "169.254.101.2  sp.D332B385-5567-42e9-8D66-545897E8120A" >> /etc/hosts
+if ! grep -q "169.254.101.2.*sp" /etc/hosts; then
+	echo "169.254.101.2  sp.D332B385-5567-42e9-8D66-545897E8120A" >> /etc/hosts
 fi
 
 %preun
@@ -96,35 +92,32 @@
 
 %postun
 # if poci DNE, this must be an uninstall
-if [ ! -f /usr/sbin/poci ]
-then
-  mv /etc/init.d/poci.bk /etc/init.d/poci
-  mv /usr/sbin/nws_poci.bk /usr/sbin/nws_poci
-  mv /usr/sbin/nws_hb.bk /usr/sbin/nws_hb
-  mv /usr/sbin/nws_mc.bk /usr/sbin/nws_mc
-
-  # check to see if poci is running...if so, stop it
-  if ( ps -Af | grep -v "grep" | grep -q "poci" )
-  then
-    /etc/init.d/poci stop
-  fi
-
-  /sbin/chkconfig --add poci
-
-  rm -f /etc/init.d/poci
-  rm -f /usr/sbin/nws_poci
-  rm -f /usr/sbin/nws_hb
-  rm -f /usr/sbin/nws_mc
-
-  # need to remove jnet's file
-  rm -rf /etc/jnet
-
-  # need to remove to /etc/hosts
-  # 169.254.101.2  sp.D332B385-5567-42e9-8D66-545897E8120A
-  if grep -q "169.254.101.2.*sp" /etc/hosts
-  then
-    sed -i -e /169.254.101.2/d /etc/hosts
-  fi
+if [ ! -f /usr/sbin/poci ]; then
+	mv /etc/init.d/poci.bk /etc/init.d/poci
+	mv /usr/sbin/nws_poci.bk /usr/sbin/nws_poci
+	mv /usr/sbin/nws_hb.bk /usr/sbin/nws_hb
+	mv /usr/sbin/nws_mc.bk /usr/sbin/nws_mc
+
+	# check to see if poci is running...if so, stop it
+	if ( ps -Af | grep -v "grep" | grep -q "poci" ); then
+		/etc/init.d/poci stop
+	fi
+
+	/sbin/chkconfig --add poci
+
+	rm -f /etc/init.d/poci
+	rm -f /usr/sbin/nws_poci
+	rm -f /usr/sbin/nws_hb
+	rm -f /usr/sbin/nws_mc
+
+	# need to remove jnet's file
+	rm -rf /etc/jnet
+
+	# need to remove to /etc/hosts
+	# 169.254.101.2  sp.D332B385-5567-42e9-8D66-545897E8120A
+	if grep -q "169.254.101.2.*sp" /etc/hosts; then
+		sed -i -e /169.254.101.2/d /etc/hosts
+	fi
 fi
 
 %post -n kernel-net-nps
@@ -156,6 +149,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.10  2006/04/20 17:07:59  glen
+- tabs
+
 Revision 1.9  2005/09/25 20:04:31  glen
 - remove redundant grep; use sed 4.0
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/nps.spec?r1=1.9&r2=1.10&f=u



More information about the pld-cvs-commit mailing list