[readonly/geninitrd/BUSYBOX: 13/113] - warn if /sbin/losetup not present and root filesystem on loopback device is to be use (but such

draenog draenog at pld-linux.org
Sat Nov 2 19:11:07 CET 2013


commit 8dce5fccefb4966c4b8a5d93c3c06e48a6c5e8e9
Author: Jacek Konieczny <jajcus at pld-linux.org>
Date:   Wed Nov 22 12:46:57 2000 +0000

    - warn if /sbin/losetup not present and root filesystem on loopback device is to be use
      (but such configuration seems to be broken anyway)
    
    
    svn-id: @1165

 geninitrd | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/geninitrd b/geninitrd
index 230186b..43bd29f 100755
--- a/geninitrd
+++ b/geninitrd
@@ -294,6 +294,10 @@ fi
 
 # check to see if we need to set up a loopback filesystem
 if is_yes "`echo $rootdev | cut -d/ -f3 | awk '/loop/ { print "yes"; }'`" ; then
+    if [ ! -x /sbin/losetup ]; then
+	echo "losetup is missing"
+	exit 1
+    fi
     key="^# $(echo $rootdev | cut -d/ -f3 | tr '[a-z]' '[A-Z]'):"
     if ! is_yes "`awk '/'$key'/ { print( "yes"); }' $fstab`" ; then
 	echo "The root filesystem is on a $rootdev, but there is no magic entry in $fstab" 1>&2
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/readonly/geninitrd.git/commitdiff/0999a53e93eedcf489380684b998ce04aaddf11c



More information about the pld-cvs-commit mailing list