[readonly/geninitrd: 433/1068] - library functions shouldn't exit

draenog draenog at pld-linux.org
Sat Nov 2 19:48:46 CET 2013


commit ada7e429e011a9e94a8c235b0421339d8f8508dd
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Fri Oct 5 22:47:27 2007 +0000

    - library functions shouldn't exit
    
    svn-id: @8791

 functions | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/functions b/functions
index 8574937..22fbebc 100644
--- a/functions
+++ b/functions
@@ -58,7 +58,7 @@ find_root() {
 	case $rootdev in
 	/dev/dm-* | /dev/mapper/*)
 		local node
-		node=$(dm_lvm2_name "$rootdev") || exit
+		node=$(dm_lvm2_name "$rootdev") || return 1
 		if [ "$node" ]; then
 			rootdev="$node"
 		fi
@@ -80,7 +80,7 @@ dm_lvm2_name() {
 
 	# redirect output to tmpfile so we won't get subshell
 	local tmp ret
-	tmp=$(mktemp) || exit
+	tmp=$(mktemp) || return 1
 
 	/sbin/lvdisplay -c 2>/dev/null | awk -F: '{print $1}' > $tmp
 	while read dev; do
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/readonly/geninitrd.git/commitdiff/147754ca159d40ca5eb541074dc043d8cbd92090



More information about the pld-cvs-commit mailing list