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

Bug#746715: the foreseeable outcome of the TC vote on init systems



Ian Jackson <ijackson@chiark.greenend.org.uk> (2014-05-02):
> (It appears that archive.debian.org doesn't keep snapshots of
> experimental so it isn't easy to see exactly what was done.)

You probably want:
  http://snapshot.debian.org/package/tftp-hpa/

Packages are easily downloaded this way:
  debsnap -d . tftp-hpa 5.2-8
  debsnap -d . tftp-hpa 5.2-9
  debdiff tftp-hpa_5.2*dsc 

Source debdiff attached for your convenience.

Mraw,
KiBi.
diff -Nru tftp-hpa-5.2/debian/changelog tftp-hpa-5.2/debian/changelog
--- tftp-hpa-5.2/debian/changelog	2013-03-31 16:54:13.000000000 +0200
+++ tftp-hpa-5.2/debian/changelog	2013-06-03 06:50:33.000000000 +0200
@@ -1,3 +1,11 @@
+tftp-hpa (5.2-9) experimental; urgency=low
+
+  * Adding upstart exit codes in initscript.
+  * Adding slightly modified upstart script from Steve Langasek
+    <steve.langasek@canonical.com> (Closes: #708851).
+
+ -- Daniel Baumann <mail@daniel-baumann.ch>  Mon, 03 Jun 2013 06:50:31 +0200
+
 tftp-hpa (5.2-8) experimental; urgency=low
 
   * Adding Slovak debconf translations from Slavko <slavko@slavino.sk>
diff -Nru tftp-hpa-5.2/debian/tftpd-hpa.init tftp-hpa-5.2/debian/tftpd-hpa.init
--- tftp-hpa-5.2/debian/tftpd-hpa.init	2013-03-31 16:53:41.000000000 +0200
+++ tftp-hpa-5.2/debian/tftpd-hpa.init	2013-06-03 06:31:51.000000000 +0200
@@ -31,6 +31,13 @@
 
 . /lib/lsb/init-functions
 
+if init_is_upstart > /dev/null 2>&1
+then
+	_INITSYSTEM="upstart"
+else
+	_INITSYSTEM="sysvinit"
+fi
+
 do_start()
 {
 	# Ensure --secure and multiple server directories are not used at the
@@ -70,18 +77,24 @@
 
 case "${1}" in
 	start)
+		[ "${_INITSYSTEM}" = "upstart" ] && exit 1
+
 		log_daemon_msg "Starting ${DESC}" "${NAME}"
 		do_start
 		log_end_msg ${?}
 		;;
 
 	stop)
+		[ "${_INITSYSTEM}" = "upstart" ] && exit 0
+
 		log_daemon_msg "Stopping ${DESC}" "${NAME}"
 		do_stop
 		log_end_msg ${?}
 		;;
 
 	restart|force-reload)
+		[ "${_INITSYSTEM}" = "upstart" ] && exit 1
+
 		log_daemon_msg "Restarting ${DESC}" "${NAME}"
 		do_stop
 		sleep 1
diff -Nru tftp-hpa-5.2/debian/tftpd-hpa.upstart tftp-hpa-5.2/debian/tftpd-hpa.upstart
--- tftp-hpa-5.2/debian/tftpd-hpa.upstart	1970-01-01 01:00:00.000000000 +0100
+++ tftp-hpa-5.2/debian/tftpd-hpa.upstart	2013-06-03 06:31:42.000000000 +0200
@@ -0,0 +1,51 @@
+description	"tftp-hpa server"
+
+start on runlevel [2345]
+stop on runlevel [!2345]
+
+expect fork
+respawn
+
+env DEFAULTS="/etc/default/tftpd-hpa"
+env PIDFILE="/var/run/tftpd-hpa.pid"
+
+pre-start script
+	if [ -f ${DEFAULTS} ]
+	then
+		. ${DEFAULTS}
+	fi
+
+	# Ensure --secure and multiple server directories are not used at the
+	# same time
+	if [ "$(echo ${TFTP_DIRECTORY} | wc -w)" -ge 2 ] && echo ${TFTP_OPTIONS} | grep -qs secure
+	then
+		echo
+		echo "When --secure is specified, exactly one directory can be specified."
+		echo "Please correct your /etc/default/tftpd-hpa."
+
+		stop
+		exit 0
+	fi
+
+	# Ensure server directories are existing
+	for _DIRECTORY in ${TFTP_DIRECTORY}
+	do
+		if [ ! -d "${_DIRECTORY}" ]
+		then
+			echo "${_DIRECTORY} missing, aborting."
+
+			stop
+			exit 0
+		fi
+	done
+
+end script
+
+script
+	if [ -f ${DEFAULTS} ]
+	then
+		. ${DEFAULTS}
+	fi
+
+	exec /usr/sbin/in.tftpd --listen  --user ${TFTP_USERNAME} --address ${TFTP_ADDRESS} ${TFTP_OPTIONS} ${TFTP_DIRECTORY}
+end script

Attachment: signature.asc
Description: Digital signature


Reply to: