/[baselayout]/trunk/init.d/checkroot
Gentoo

Diff of /trunk/init.d/checkroot

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 27 Revision 28
2 2
3start() { 3start() {
4 ebegin "Remounting root filesystem read-only (if necessary)" 4 ebegin "Remounting root filesystem read-only (if necessary)"
5 mount / -o remount,ro 5 mount / -o remount,ro
6 eend $? 6 eend $?
7 echo mount -f / -o remount,ro >> /dev/shm/etc/mtab.sh
8 ebegin "Checking root filesystem" 7 ebegin "Checking root filesystem"
9 fsck -a 8 fsck -a
10 if [ $? -eq 0 ] 9 if [ $? -eq 0 ]
11 then 10 then
12 eend 0 11 eend 0
19 reboot -f 18 reboot -f
20 fi 19 fi
21 20
22 ebegin "Remounting root filesystem read/write" 21 ebegin "Remounting root filesystem read/write"
23 mount / -o remount,rw 22 mount / -o remount,rw
24 echo mount -f / -o remount,rw >> /dev/shm/etc/mtab.sh
25 eend $? 23 eend $?
26
27 ebegin "Setting up /etc/mtab"
28 rm -f /etc/mtab
29 touch /etc/mtab
30 chmod 0644 /etc/mtab
31 source /dev/shm/etc/mtab.sh
32 eend
33 return 24 return
34} 25}
35 26

Legend:
Removed from v.27  
changed lines
  Added in v.28

  ViewVC Help
Powered by ViewVC 1.1.20