]> git.ipfire.org Git - ipfire-2.x.git/blame - src/boot.d/07-mountotherfs
HinzugefĆ¼gt:
[ipfire-2.x.git] / src / boot.d / 07-mountotherfs
CommitLineData
f8ae001e
MT
1#!/bin/sh
2STRING="Checking other filesystems"
3fsck -R -T -a -C -A
4RC=$?
5
6if [ "$RC" = "0" ]; then
7 echo "$STRING: Success"
8elif [ "$RC" = "1" ]; then
9 echo "$STRING: Passed"
10fi
11
12# A return of 2 or higher means there were serious problems.
13if [ $RC -gt 1 ]; then
14 echo "$STRING: Failed"
15 echo "*** An error occurred during the file system check."
16 echo "*** Dropping you to a shell; the system will reboot"
17 echo "*** when you leave the shell."
18 export PS1="(Repair filesystem) \# # "
19 sulogin
20 echo "Unmounting filesystems"
21 umount -n -a
22 mount -n -o remount,ro /
23 echo "Automatic reboot in progress."
24 reboot -f
25fi
26
27echo "Mounting other filesystems"
28mount -a -n
29
30if [ -e /swapfile ]; then
31 echo "Turning on swap"
32 chmod 600 /swapfile
33 swapon /swapfile
34fi