SVN: geninitrd/trunk: functions geninitrd

glen glen at pld-linux.org
Thu Feb 8 19:24:35 CET 2007


Author: glen
Date: Thu Feb  8 19:24:34 2007
New Revision: 8241

Modified:
   geninitrd/trunk/functions
   geninitrd/trunk/geninitrd
Log:
- allow setting prefix for function messages via $PROGRAM global

Modified: geninitrd/trunk/functions
==============================================================================
--- geninitrd/trunk/functions	(original)
+++ geninitrd/trunk/functions	Thu Feb  8 19:24:34 2007
@@ -14,7 +14,7 @@
 #
 find_root() {
 	local fstab="$1"
-	local function='find_root'
+	local function="${PROGRAM:+$PROGRAM: }find_root"
 
 	eval $(awk '/^[\t ]*#/ {next} {if ( $2 == "/" ) {print "rootdev=\"" $1 "\"\nrootFs=\"" $3 "\""}}' $fstab)
 	if [ -z "$rootdev" ]; then

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd	(original)
+++ geninitrd/trunk/geninitrd	Thu Feb  8 19:24:34 2007
@@ -14,7 +14,8 @@
 #
 
 RCSID='$Id$'
-VERSION=$(echo "$RCSID" | awk '{print $3}')
+R=${RCSID#* * }; VERSION=${R%% *}
+PROGRAM=${0##*/}
 
 . /etc/rc.d/init.d/functions
 . /etc/geninitrd/functions


More information about the pld-cvs-commit mailing list