More spacing cleanups.
authorChris Gianelloni <wolf31o2@gentoo.org>
Thu, 1 Jun 2006 13:49:15 +0000 (13:49 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Thu, 1 Jun 2006 13:49:15 +0000 (13:49 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@399 67a159dc-881f-0410-a524-ba9dfbe2cb84

generic/linuxrc

index c19b689fdc48c62a2480e7c78b43606a6286d01f..7e2975df97282c5a47c9bfcbeb312212059f4845 100644 (file)
@@ -680,7 +680,7 @@ then
        echo -n '.'
 
        # /usr/src/linux/Documentation/initrd.txt:
-       #          exec chroot . /sbin/init </dev/console >/dev/console 2>&1
+       #       exec chroot . /sbin/init </dev/console >/dev/console 2>&1
 
        exec <dev/console >dev/console 2>&1
        echo '.'
@@ -691,58 +691,58 @@ then
 EOF
 elif [ "$0" = '/init' ]
 then
-          [ ! -e /${CHROOT}/dev/console ] && mknod /${CHROOT}/dev/console c 5 1
-          [ ! -e /${CHROOT}/dev/tty1 ] && mknod /${CHROOT}/dev/tty1 c 4 1
-          echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting (initramfs)"
-
-          cd ${CHROOT}
-          mkdir /${CHROOT}/proc /${CHROOT}/sys 2>/dev/null
-          echo -n '.'
-                          umount /sys || echo '*: Failed to unmount the initrd /sys!'
-                          umount /proc || echo '*: Failed to unmount the initrd /proc!'
-          echo -n '.'
-
-          exec <${CONSOLE} >${CONSOLE} 2>&1
-          echo '.'
-
-          # Cleanup initramfs in the background
-          # to reclaim initramfs tmpfs memoryspace
-
-          INITRAMFS_FILES=`ls / | sed -e 's|dev||'`
-          INITRAMFS_FILES=`echo ${INITRAMFS_FILES}|sed -e "s|${CHROOT#/}||g"`
-          
-          if [ -n "${MEMORY}" ]
-          then
+       [ ! -e ${CHROOT}/dev/console ] && mknod ${CHROOT}/dev/console c 5 1
+       [ ! -e ${CHROOT}/dev/tty1 ] && mknod ${CHROOT}/dev/tty1 c 4 1
+       echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting (initramfs)"
+
+       cd ${CHROOT}
+       mkdir ${CHROOT}/proc ${CHROOT}/sys 2>/dev/null
+       echo -n '.'
+               umount /sys || echo '*: Failed to unmount the initrd /sys!'
+               umount /proc || echo '*: Failed to unmount the initrd /proc!'
+       echo -n '.'
+
+       exec <${CONSOLE} >${CONSOLE} 2>&1
+       echo '.'
+
+       # Cleanup initramfs in the background
+       # to reclaim initramfs tmpfs memoryspace
+
+       INITRAMFS_FILES=`ls / | sed -e 's|dev||'`
+       INITRAMFS_FILES=`echo ${INITRAMFS_FILES}|sed -e "s|${CHROOT#/}||g"`
+
+       if [ -n "${MEMORY}" ]
+       then
                INITRAMFS_FILES=`echo ${INITRAMFS_FILES}|sed -e "s|${MEMORY#/}||g"`
-          fi
-          
-          if [ -n "${UNION}" ]
-          then
+       fi
+
+       if [ -n "${UNION}" ]
+       then
                INITRAMFS_FILES=`echo ${INITRAMFS_FILES}|sed -e "s|${UNION#/}||g"`
-          fi
-          INITRAMFS_FILES=`echo ${INITRAMFS_FILES}|sed -e "s|newroot||g"`
+       fi
+       INITRAMFS_FILES=`echo ${INITRAMFS_FILES}|sed -e "s|newroot||g"`
 
-          for i in ${INITRAMFS_FILES}
-          do
+       for i in ${INITRAMFS_FILES}
+       do
                for j in `/bin/busybox find /$i 2> /dev/null`
                do
                        if /bin/busybox [ ! -d "$j" -a "$j" != "/bin/busybox" ]
                        then
-                               /bin/busybox rm "$j"
+                               /bin/busybox rm -f "$j"
                        fi
 
                        if /bin/busybox [ -d "${j}" -a "${j}" != "/bin" -a "${j}" != "/dev" -a "${j}" != "/sys" ]
                        then
-                               /bin/busybox rm -r "$j"
+                               /bin/busybox rm -rf "$j"
                        fi
                done
-          done
-          # End initramfs cleanup
+       done
+       # End initramfs cleanup
 
-          # Start the real root init
-          (/bin/busybox sleep 3; /bin/busybox rm -r /bin/busybox /dev) & 
-          exec /bin/busybox chroot . /bin/sh <<- EOF
-          exec /sbin/init ${REAL_INIT}
+       # Start the real root init
+       (/bin/busybox sleep 3; /bin/busybox rm -r /bin/busybox /dev) & 
+       exec /bin/busybox chroot . /bin/sh <<- EOF
+       exec /sbin/init ${REAL_INIT}
 EOF
 
 fi