SVN: geninitrd/trunk/geninitrd

glen glen at pld-linux.org
Thu Oct 4 17:08:17 CEST 2007


Author: glen
Date: Thu Oct  4 17:08:17 2007
New Revision: 8773

Modified:
   geninitrd/trunk/geninitrd
Log:
- die() function for generic exit

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd	(original)
+++ geninitrd/trunk/geninitrd	Thu Oct  4 17:08:17 2007
@@ -91,6 +91,13 @@
 	[ -n "$verbose" ] && echo "$*"
 }
 
+# aborts program abnormally
+die() {
+	local rc={$2:-1}
+	echo >&2 "$PROGRAM: ERROR: $1"
+	exit $rc
+}
+
 # Checks if busybox has support for APPLET(s)
 # Exits from geninitrd if the support is not present.
 #


More information about the pld-cvs-commit mailing list