]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/boot.d/06-mountrootfs
Ein NTFS-Update fuer den Heiner :D
[people/pmueller/ipfire-2.x.git] / src / boot.d / 06-mountrootfs
CommitLineData
f8ae001e
MT
1#!/bin/sh
2STRING="Checking root filesystem"
3
4fsck -R -T -a -C /
5RC=$?
6
7if [ "$RC" = "0" ]; then
8 echo "$STRING: Success"
9elif [ "$RC" = "1" ]; then
10 echo "$STRING: Passed"
11fi
12
13# A return of 2 or higher means there were serious problems.
14if [ $RC -gt 1 ]; then
15 echo "$STRING: Failed"
16 echo "*** An error occurred during the file system check."
17 echo "*** Dropping you to a shell; the system will reboot"
18 echo "*** when you leave the shell."
19 export PS1="(Repair filesystem) \# # "
20 sulogin
21 echo "Unmounting filesystems"
22 umount -a
23 mount -n -o remount,ro /
24 echo "Automatic reboot in progress."
25 reboot -f
26fi
27
28echo "Mounting root read/write"
29mount -n -o remount,rw /