[Pkg-sysvinit-commits] r546 - in sysvinit/trunk/debian: .
sysv-rc/etc/init.d
Petter Reinholdtsen
pere at costa.debian.org
Sun Jan 8 15:07:42 UTC 2006
Author: pere
Date: 2006-01-08 15:07:41 +0000 (Sun, 08 Jan 2006)
New Revision: 546
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/sysv-rc/etc/init.d/rc
Log:
* Add code to detect and report bad 'exit' calls in init.d scripts,
if they kill /etc/init.d/rc.
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2006-01-08 13:47:11 UTC (rev 545)
+++ sysvinit/trunk/debian/changelog 2006-01-08 15:07:41 UTC (rev 546)
@@ -49,6 +49,8 @@
[ Petter Reinholdtsen ]
* sysv-rc: Fix some typos in the startpar handling. (Closes: #345269)
+ * Add code to detect and report bad 'exit' calls in init.d scripts,
+ if they kill /etc/init.d/rc.
Thanks to Mark Hatle for help with this release.
Modified: sysvinit/trunk/debian/sysv-rc/etc/init.d/rc
===================================================================
--- sysvinit/trunk/debian/sysv-rc/etc/init.d/rc 2006-01-08 13:47:11 UTC (rev 545)
+++ sysvinit/trunk/debian/sysv-rc/etc/init.d/rc 2006-01-08 15:07:41 UTC (rev 546)
@@ -89,6 +89,11 @@
esac
}
+on_exit() {
+ echo "$0 exited outside the expected code flow.
+}
+trap on_exit EXIT # Enable emergency handler
+
# Ignore CTRL-C only in this shell, so we can interrupt subprocesses.
trap ":" INT QUIT TSTP
@@ -258,3 +263,5 @@
fi
fi
+trap - EXIT # Disable emergency handler
+exit 0 # Exit normally
More information about the Pkg-sysvinit-commits
mailing list