aboutsummaryrefslogtreecommitdiff
path: root/init.d/checkroot
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-09-25 19:18:09 +0000
committerRoy Marples <roy@marples.name>2007-09-25 19:18:09 +0000
commit15b703c6e41466e2202ef9af916e3e35fb385bb0 (patch)
tree852209bc8e2b4aaaab1c1487c0c1deb0f5dc93ff /init.d/checkroot
parent6a14825e74c9abdbc024202543fd5fea0ca4a3de (diff)
No need for that sed anymore
Diffstat (limited to 'init.d/checkroot')
-rwxr-xr-xinit.d/checkroot9
1 files changed, 4 insertions, 5 deletions
diff --git a/init.d/checkroot b/init.d/checkroot
index 72a59388..3bf2e860 100755
--- a/init.d/checkroot
+++ b/init.d/checkroot
@@ -7,7 +7,7 @@ and optionally repair them."
do_mtab() {
# Don't create mtab if /etc is readonly
- if ! echo 2>/dev/null >/etc/mtab ; then
+ if ! printf "" 2>/dev/null >/etc/mtab ; then
ewarn "Skipping /etc/mtab initialization" "(ro root?)"
return 0
fi
@@ -19,10 +19,9 @@ do_mtab() {
grep -v "^[^ ]* / " /proc/mounts >> /etc/mtab
# Now make sure /etc/mtab have additional info (gid, etc) in there
- local mnt= mnts="$(mountinfo | sed -e "s/^/'/g" -e "s/$/'/g")"
- eval set -- ${mnts}
- for mnt in "$@" ; do
- if fstabinfo --mountcmd "${mnt}" >/dev/null ; then
+ local mnt=
+ mountinfo | while read mnt; do
+ if fstabinfo --quiet --mountcmd "${mnt}"; then
mount -f -o remount "${mnt}"
fi
done