LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File maradns-opensuse.patch of Package MaraDNS (Project home:jleifman)

diff -ur maradns-1.3.07.08/build/install.sh maradns-1.3.07.08-obs/build/install.sh
--- maradns-1.3.07.08/build/install.sh	Wed Aug 29 12:30:03 2007
+++ maradns-1.3.07.08-obs/build/install.sh	Sun Jan 20 20:11:22 2008
@@ -160,26 +160,22 @@
 cd $TOPLEVEL
 # And copy over the init files if this system looks to be a sysVish init
 # system
-if [ -d $RPM_BUILD_ROOT/etc/rc.d/init.d ] ; then
+if [ -d $RPM_BUILD_ROOT/etc/init.d ] ; then
 	echo Adding MaraDNS startup scripts
-	if [ ! -f $RPM_BUILD_ROOT/etc/rc.d/init.d/maradns ] ; then
-	      cp $BUILDDIR/mara.startup $RPM_BUILD_ROOT/etc/rc.d/init.d/maradns
+	if [ ! -f $RPM_BUILD_ROOT/etc/init.d/maradns ] ; then
+	      cp $BUILDDIR/mara.startup $RPM_BUILD_ROOT/etc/init.d/maradns
 	      cp $BUILDDIR/zoneserver.startup \
-	          $RPM_BUILD_ROOT/etc/rc.d/init.d/maradns.zoneserver
+	          $RPM_BUILD_ROOT/etc/init.d/maradns.zoneserver
 	fi
-	if cd $RPM_BUILD_ROOT/etc/rc.d/rc3.d/ ; then
-		echo Starting up MaraDNS at runlevel 3
-		rm S60maradns 2> /dev/null
-		rm K60maradns.zoneserver 2> /dev/null
-		ln -s ../init.d/maradns S60maradns
-		ln -s ../init.d/maradns.zoneserver K60maradns.zoneserver
+	# We remove the file first to avoid the "text file busy" problem
+	if [ -f $SBIN/rcmaradns ] ; then
+		rm $SBIN/rcmaradns
 	fi
-	if cd $RPM_BUILD_ROOT/etc/rc.d/rc5.d/ ; then
-		echo starting up MaraDNS at runlevel 5
-		rm S60maradns 2> /dev/null
-		rm K60maradns.zoneserver 2> /dev/null
-		ln -s ../init.d/maradns S60maradns
-		ln -s ../init.d/maradns.zoneserver K60maradns.zoneserver
+	ln -s /etc/init.d/maradns $SBIN/rcmaradns
+
+	if [ -f $SBIN/rczoneserver ] ; then
+		rm $SBIN/rczoneserver
 	fi
+	ln -s /etc/init.d/maradns.zoneserver $SBIN/rczoneserver
 fi
 
diff -ur maradns-1.3.07.08/build/mara.startup maradns-1.3.07.08-obs/build/mara.startup
--- maradns-1.3.07.08/build/mara.startup	Wed Jul 26 11:58:44 2006
+++ maradns-1.3.07.08-obs/build/mara.startup	Sun Jan 20 20:55:42 2008
@@ -3,6 +3,22 @@
 # chkconfig: - 55 45
 # description: MaraDNS is secure Domain Name Server (DNS)
 # probe: true
+#
+### BEGIN INIT INFO
+# Provides:          named maradns
+# Required-Start:    $syslog $remote_fs $network
+# Should-Start:
+# Required-Stop:     $syslog $remote_fs $network
+# Should-Stop:
+# Default-Start:     3 5
+# Default-Stop:      0 1 2 6
+# Short-Description: MaraDNS is a security-aware DNS server
+# Description:
+#	MaraDNS is an authoritative and recursive DNS server made with
+#	security and embedded systems in mind.  More information is at
+#	http://www.maradns.org
+#
+### END INIT INFO
 
 # Copyright 2005-2006 Sam Trenholme
 
diff -ur maradns-1.3.07.08/build/uninstall.sh maradns-1.3.07.08-obs/build/uninstall.sh
--- maradns-1.3.07.08/build/uninstall.sh	Mon Jan 21 19:22:54 2002
+++ maradns-1.3.07.08-obs/build/uninstall.sh	Sun Jan 20 20:37:51 2008
@@ -14,6 +14,7 @@
 echo man pages in $MAN1 and $MAN8, and the directory tree $DOCS
 cd $SBIN
 rm maradns zoneserver
+rm rcmaradns rczoneserver
 cd $BIN
 rm askmara getzone
 cd $MAN1
@@ -21,11 +22,10 @@
 cd $MAN8
 rm maradns.8 zoneserver.8
 rm -fr $DOCS
-if [ -d /etc/rc.d/init.d ] ; then
+if [ -d $RPM_BUILD_ROOT/etc/init.d ] ; then
 	echo Removing MaraDNS startup scripts
-	rm /etc/rc.d/rc3.d/S60maradns
-	rm /etc/rc.d/rc5.d/S60maradns
-	rm /etc/rc.d/init.d/maradns
+	rm $RPM_BUILD_ROOT/etc/init.d/maradns
+	rm $RPM_BUILD_ROOT/etc/init.d/maradns.zoneserver
 fi
 
 echo Note that cahced copies of man pages may still be lurking around
diff -ur maradns-1.3.07.08/build/zoneserver.startup maradns-1.3.07.08-obs/build/zoneserver.startup
--- maradns-1.3.07.08/build/zoneserver.startup	Wed Apr  5 05:11:48 2006
+++ maradns-1.3.07.08-obs/build/zoneserver.startup	Sun Jan 20 22:42:22 2008
@@ -1,4 +1,17 @@
 #!/bin/bash
+#
+### BEGIN INIT INFO
+# Provides:          zoneserver
+# Required-Start:    $syslog $remote_fs $network maradns
+# Should-Start:
+# Required-Stop:     $syslog $remote_fs $network maradns
+# Should-Stop:
+# Default-Start:     3 5
+# Default-Stop:      0 1 2 6
+# Short-Description: handle zone transfers and other TCP functions for MaraDNS
+# Description:       Handle zone transfers and other TCP functions for MaraDNS
+#
+### END INIT INFO
 
 # Copyright 2005-2006 Sam Trenholme