]> git.sur5r.net Git - bacula/rescue/commitdiff
Create /dev/loop2 if it doesn't exist
authorKern Sibbald <kern@sibbald.com>
Sat, 29 Dec 2007 18:19:05 +0000 (18:19 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 29 Dec 2007 18:19:05 +0000 (18:19 +0000)
rescue/linux/cdrom/makeinitrd

index f83e15ed7de01defea02b4c41145055da841bbce..eb6a5b0d4705953b9d739dcb23f1b589c1b76590 100755 (executable)
@@ -10,6 +10,13 @@ mkdir -p $LOOP2
 # RAM disk image (initrd) is is in the roottree directory. 
 
 echo "Creating the Initial RAM disk image.... "
 # RAM disk image (initrd) is is in the roottree directory. 
 
 echo "Creating the Initial RAM disk image.... "
+if test ! -b /dev/loop2; then
+  mknod /dev/loop2 b 7 2
+  if [ $? != 0 ] ; then
+     echo "Cannot create /dev/loop2"
+     exit 1
+  fi
+fi
 
 # first find out how much space we need. 
 ISIZE=`du -s -k  roottree/ | awk '{print $1}'`
 
 # first find out how much space we need. 
 ISIZE=`du -s -k  roottree/ | awk '{print $1}'`