Lines 13-32
depend()
Link Here
|
13 |
start() |
13 |
start() |
14 |
{ |
14 |
{ |
15 |
case ",$(fstabinfo -o /)," in |
15 |
case ",$(fstabinfo -o /)," in |
16 |
*,ro,*) return 0;; |
16 |
*,ro,*) |
|
|
17 |
;; |
18 |
*) |
19 |
# Check if the rootfs isn't already writable. |
20 |
if echo 2>/dev/null >/.test.$$; then |
21 |
rm -f /.test.$$ /fastboot /forcefsck |
22 |
else |
23 |
ebegin "Remounting root filesystem read/write" |
24 |
case "$RC_UNAME" in |
25 |
Linux) |
26 |
mount -n -o remount,rw / |
27 |
;; |
28 |
*) |
29 |
mount -u -o rw / |
30 |
;; |
31 |
esac |
32 |
if eend $? "Root filesystem could not be mounted read/write"; then |
33 |
rm -f /fastboot /forcefsck |
34 |
fi |
35 |
fi |
36 |
;; |
17 |
esac |
37 |
esac |
18 |
|
38 |
|
19 |
if echo 2>/dev/null >/.test.$$; then |
39 |
ebegin "Remounting filesystems" |
20 |
rm -f /.test.$$ /fastboot /forcefsck |
40 |
local mountpoint |
21 |
return 0 |
41 |
for mountpoint in $(fstabinfo); do |
22 |
fi |
42 |
case "${mountpoint}" in |
23 |
|
43 |
/) |
24 |
ebegin "Remounting root filesystem read/write" |
44 |
;; |
25 |
case "$RC_UNAME" in |
45 |
/*) |
26 |
Linux) mount -n -o remount,rw /;; |
46 |
mountinfo -q "${mountpoint}" && fstabinfo --remount "${mountpoint}" |
27 |
*) mount -u -o rw /;; |
47 |
;; |
28 |
esac |
48 |
esac |
29 |
if eend $? "Root filesystem could not be mounted read/write"; then |
49 |
done |
30 |
rm -f /fastboot /forcefsck |
50 |
eend 0 |
31 |
fi |
|
|
32 |
} |
51 |
} |
33 |
- |
|
|