• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2#
3# /usr/share/e2fsprogs/initrd.ext3-add-journal
4#
5cd /
6mount -nt proc proc proc
7rootdev=$(cat proc/sys/kernel/real-root-dev)
8cmdline=$(cat /proc/cmdline)
9umount -n proc
10if [ $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
27fi
28