/[baselayout]/branches/baselayout-1_12/init.d/checkfs
Gentoo

Contents of /branches/baselayout-1_12/init.d/checkfs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1776 - (show annotations) (download)
Tue Dec 27 05:07:44 2005 UTC (8 years, 3 months ago) by vapier
File size: 1056 byte(s)
start volume related stuff much earlier in the boot process
1 #!/sbin/runscript
2 # Copyright 1999-2005 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4
5 depend() {
6 need checkroot modules
7 }
8
9 start() {
10 local retval=0
11
12 # Setup dm-crypt mappings if any
13 start_addon dm-crypt
14
15 if [[ -f /fastboot ]] || [[ -n ${CDBOOT} ]] ; then
16 rm -f /fastboot
17 else
18 ebegin "Checking all filesystems"
19 if [[ -f /forcefsck ]] ; then
20 ewarn "A full fsck has been forced"
21 fsck -C -T -R -A -a -f
22 retval=$?
23 rm -f /forcefsck
24 else
25 fsck -C -T -R -A -a
26 retval=$?
27 fi
28 if [[ ${retval} -eq 0 ]] ; then
29 eend 0
30 elif [[ ${retval} -ge 1 && ${retval} -le 3 ]] ; then
31 ewend 1 "Filesystem errors corrected."
32 # Everything should be ok, so return a pass
33 return 0
34 else
35 if [[ ${RC_FORCE_AUTO} == "yes" ]] ; then
36 eend 2 "Fsck could not correct all errors, rerunning"
37 fsck -C -T -R -A -y
38 retval=$?
39 fi
40
41 if [[ ${retval} -gt 3 ]] ; then
42 eend 2 "Fsck could not correct all errors, manual repair needed"
43 /sbin/sulogin ${CONSOLE}
44 fi
45 fi
46 fi
47 }
48
49
50 # vim:ts=4

Properties

Name Value
svn:eol-style native
svn:executable *
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20