]> git.sur5r.net Git - bacula/rescue/blobdiff - rescue/linux/cdrom/makeinitrd
Enhance makefiles
[bacula/rescue] / rescue / linux / cdrom / makeinitrd
index e7ca4c5ee4cc25276e6db3e41e3ac872a93d3f92..e5e87dc1bab4f9f7878fba500f466eecc8b8c2fe 100755 (executable)
@@ -29,39 +29,39 @@ echo "Initial RAM disk contents will be $ISIZE KB"
 # delete the existing RAM disk image, if there is one
 rm -f root
 
-dd if=/dev/zero of=$TOPDIR/root bs=1k count=$ISIZE
+dd if=/dev/zero of=$TOPDIR/root bs=1k count=$ISIZE
 
-umount /mnt/loop2  2>/dev/null >/dev/null
-losetup -d /dev/loop2 2>/dev/null >/dev/null
+umount /mnt/loop2  2>/dev/null >/dev/null
+losetup -d /dev/loop2 2>/dev/null >/dev/null
 
-# associate it with /dev/loop2
-losetup /dev/loop2 $TOPDIR/root
+# associate it with /dev/loop2
+losetup /dev/loop2 $TOPDIR/root
 
-# make an ext2 filesystem on it. Set reserve to 0
-mke2fs -q -m 0 /dev/loop2 $ISIZE
-if [ $? != 0 ] ; then
-  echo "Build failed."
-  exit 1
-fi
+# make an ext2 filesystem on it. Set reserve to 0
+mke2fs -q -m 0 /dev/loop2 $ISIZE
+if [ $? != 0 ] ; then
+  echo "Build failed."
+  exit 1
+fi
 
-# we mount it...
-mount /dev/loop2 /mnt/loop2 
+# we mount it...
+mount /dev/loop2 /mnt/loop2 
 
-# ... and delete the lost+found directory 
-rm -rf /mnt/loop2/lost+found 
+# ... and delete the lost+found directory 
+rm -rf /mnt/loop2/lost+found 
 
-# then we copy the contents of our roottree to this filesystem
-cp -dpR roottree/* /mnt/loop2/
-if [ $? != 0 ] ; then
-  echo "RAM disk build failed."
-  exit 1
-fi
+# then we copy the contents of our roottree to this filesystem
+cp -dpR roottree/* /mnt/loop2/
+if [ $? != 0 ] ; then
+  echo "RAM disk build failed."
+  exit 1
+fi
 
-# and unmount and divorce /dev/loop2
-umount /mnt/loop2
-losetup -d /dev/loop2 
+# and unmount and divorce /dev/loop2
+umount /mnt/loop2
+losetup -d /dev/loop2 
 
-(cd roottree; find . | cpio --quiet -c -o) >root
+(cd roottree; find . | cpio --quiet -c -o) >root
 
 echo "Building initial RAM disk done"