1 #!/bin/sh 2 # 3 # /usr/share/e2fsprogs/initrd.ext3-add-journal 4 # 5 cd / 6 mount -nt proc proc proc 7 rootdev=$(cat proc/sys/kernel/real-root-dev) 8 cmdline=$(cat /proc/cmdline) 9 umount -n proc 10 if [ $rootdev != 256 -a $rootdev != 255 ]; then 11 mount -nt tmpfs tmpfs /dev2 12 get_device 13 roottype=`/bin/e2initrd_helper -r /dev2/root2` 14 if test -n "$roottype" ; then 15 mount -nt tmpfs tmpfs /etc 16 echo >> /etc/fstab 17 echo >> /etc/mtab 18 if test "$roottype" = "ext3" ; then 19 /sbin/tune2fs -O has_journal /dev2/root2 > /dev/null 2>&1 20 else 21 /sbin/tune2fs -O ^has_journal /dev2/root2 > /dev/null 2>&1 22 fi 23 umount -n /etc 24 fi 25 umount -n /dev2 26 umount -n /proc > /dev/null 2>&1 27 fi 28