[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Please review my patch for sysklogd



Hello!

I tried this weekend on the BSP in Jülich, to remove some of the
blocking bugs for our RC Bug.

So If you please can review my patch for sysklogd (and maybe improve it)
I added a debconf question, which only appears with a debconf prio of
"low": With this debconf question it is possible to preseed sysklogd to
log to a remote server. (The debconf question will
edit /etc/default/syslogd to specify some options.


if this patch is okay I will send it to the BTS. 

Greetings
Patrick

diff -Nru /tmp/VrD1HUUixW/sysklogd-1.4.1/debian/conffiles /tmp/PdZaIpjxOf/sysklogd-1.4.1/debian/conffiles
--- /tmp/VrD1HUUixW/sysklogd-1.4.1/debian/conffiles	2006-09-17 16:15:44.000000000 +0000
+++ /tmp/PdZaIpjxOf/sysklogd-1.4.1/debian/conffiles	2006-09-17 16:15:44.000000000 +0000
@@ -1,4 +1,3 @@
-/etc/default/syslogd
 /etc/syslog.conf
 /etc/init.d/sysklogd
 /etc/cron.daily/sysklogd
diff -Nru /tmp/VrD1HUUixW/sysklogd-1.4.1/debian/config /tmp/PdZaIpjxOf/sysklogd-1.4.1/debian/config
--- /tmp/VrD1HUUixW/sysklogd-1.4.1/debian/config	1970-01-01 00:00:00.000000000 +0000
+++ /tmp/PdZaIpjxOf/sysklogd-1.4.1/debian/config	2006-09-17 16:15:44.000000000 +0000
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+. /usr/share/debconf/confmodule
+
+##Fix for debian-edu-config:
+#make sysklogd options preseedable
+db_input low sysklogd/sysklogd-default-options || true
+db_go
+
diff -Nru /tmp/VrD1HUUixW/sysklogd-1.4.1/debian/control /tmp/PdZaIpjxOf/sysklogd-1.4.1/debian/control
--- /tmp/VrD1HUUixW/sysklogd-1.4.1/debian/control	2006-09-17 16:15:44.000000000 +0000
+++ /tmp/PdZaIpjxOf/sysklogd-1.4.1/debian/control	2006-09-17 16:15:44.000000000 +0000
@@ -7,7 +7,7 @@
 Package: sysklogd
 Architecture: any
 Section: admin
-Depends: ${shlibs:Depends}, klogd | linux-kernel-log-daemon
+Depends: ${shlibs:Depends}, klogd | linux-kernel-log-daemon, debconf ( >=0.5 ) | debconf-2.0
 Conflicts: syslogd
 Provides: syslogd, system-log-daemon
 Replaces: syslogd
diff -Nru /tmp/VrD1HUUixW/sysklogd-1.4.1/debian/postinst /tmp/PdZaIpjxOf/sysklogd-1.4.1/debian/postinst
--- /tmp/VrD1HUUixW/sysklogd-1.4.1/debian/postinst	2006-09-17 16:15:44.000000000 +0000
+++ /tmp/PdZaIpjxOf/sysklogd-1.4.1/debian/postinst	2006-09-17 16:15:44.000000000 +0000
@@ -2,6 +2,8 @@
 
 set -e
 
+. /usr/share/debconf/confmodule
+
 if [ ! -d /var/log/news ] \
 	&& grep -q /var/log/news/ /etc/syslog.conf \
 	&& grep -q ^news: /etc/passwd \
@@ -74,6 +76,19 @@
 	fi
 	set -e
     fi
+    ##Fix for debian-edu-config:
+    #Make sysklogd options preseedable. 
+    if [ ! -e /etc/default/syslogd ]; then
+    	cp /usr/share/doc/sysklogd/examples/syslogd /etc/default/
+    fi
+
+    db_get sysklogd/sysklogd-default-options
+
+    if [ ! -z "$RET" ]; then
+    	 sed -e "s/^\([[:space:]]*\)SYSLOGD[[:space:]]*=.*/\1SYSLOGD=\"$RET\"/" -i /etc/default/syslogd
+    fi
+
+    db_stop
 fi
 
 
diff -Nru /tmp/VrD1HUUixW/sysklogd-1.4.1/debian/rules /tmp/PdZaIpjxOf/sysklogd-1.4.1/debian/rules
--- /tmp/VrD1HUUixW/sysklogd-1.4.1/debian/rules	2006-09-17 16:15:44.000000000 +0000
+++ /tmp/PdZaIpjxOf/sysklogd-1.4.1/debian/rules	2006-09-17 16:15:44.000000000 +0000
@@ -74,8 +74,8 @@
 	chown -R root:root debian/tmp.sysklogd
 	chmod -R g-ws debian/tmp.sysklogd
 	$(installbin) -d debian/tmp.sysklogd/usr/share/doc/$(package)
-	$(installbin) debian/{preinst,postinst,postrm,prerm} debian/tmp.sysklogd/DEBIAN/
-	$(installdoc) debian/conffiles debian/tmp.sysklogd/DEBIAN/
+	$(installbin) debian/{preinst,postinst,postrm,prerm,config} debian/tmp.sysklogd/DEBIAN/
+	$(installdoc) debian/{conffiles,templates} debian/tmp.sysklogd/DEBIAN/
 	$(installdoc) debian/changelog debian/tmp.sysklogd/usr/share/doc/$(package)/changelog.Debian
 	#
 	$(installbin) -d debian/tmp.sysklogd/usr/share/$(package)
@@ -92,7 +92,8 @@
 	$(installbin) debian/syslog-facility debian/tmp.sysklogd/usr/sbin
 	#
 	$(installbin) -d debian/tmp.sysklogd/etc/{init.d,cron.{daily,weekly},default}
-	$(installbin) debian/default debian/tmp.sysklogd/etc/default/syslogd
+	$(installbin) -d debian/tmp.sysklogd/usr/share/doc/sysklogd/examples
+	$(installbin) debian/default debian/tmp.sysklogd/usr/share/doc/sysklogd/examples/syslogd
 	$(installbin) debian/rc debian/tmp.sysklogd/etc/init.d/sysklogd
 	$(installbin) debian/cron.weekly debian/tmp.sysklogd/etc/cron.weekly/sysklogd
 	$(installbin) debian/cron.daily debian/tmp.sysklogd/etc/cron.daily/sysklogd
diff -Nru /tmp/VrD1HUUixW/sysklogd-1.4.1/debian/templates /tmp/PdZaIpjxOf/sysklogd-1.4.1/debian/templates
--- /tmp/VrD1HUUixW/sysklogd-1.4.1/debian/templates	1970-01-01 00:00:00.000000000 +0000
+++ /tmp/PdZaIpjxOf/sysklogd-1.4.1/debian/templates	2006-09-17 16:15:44.000000000 +0000
@@ -0,0 +1,8 @@
+Template: sysklogd/sysklogd-default-options
+Type: string
+Description: Enter the options you want sysklogd to use
+ Enter only the options like "-r" or "-m 0" without anything else before
+ or behind.
+Description-de.UTF-8: Geben Sie die Optionen an, die sysklogd benutzen soll
+ Geben Sie lediglich die Optionen an, ohne zum Beispiel den Programmnamen davor
+ oder dahinter. Ã?hnlich wie dieses Beispiel: -r

Reply to: