diff options
author | Roy Marples <roy@marples.name> | 2007-12-14 14:12:38 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-12-14 14:12:38 +0000 |
commit | 9f2403dffae514dca431828014a2dc9c9de4e61f (patch) | |
tree | bc1bd6ae83589f729a3bf7ca6d5ab592cbec56fd /init.d/checkroot | |
parent | a3db3bac6242ff29871161620d0449125b3262aa (diff) |
Remove Gentoo copyright from all files that I know I have written
Diffstat (limited to 'init.d/checkroot')
-rwxr-xr-x | init.d/checkroot | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/init.d/checkroot b/init.d/checkroot index acfb914a..ef491847 100755 --- a/init.d/checkroot +++ b/init.d/checkroot @@ -1,5 +1,4 @@ #!/sbin/runscript -# Copyright 1999-2007 Gentoo Foundation # Copyright 2007 Roy Marples # All rights reserved @@ -33,8 +32,8 @@ depend() { do_mtab() { # Don't create mtab if /etc is readonly - if ! printf "" 2>/dev/null >/etc/mtab; then - ewarn "Skipping /etc/mtab initialization (ro root?)" + if ! cp /dev/null >/etc/mtab 2>/dev/null; then + ewarn "Skipping /etc/mtab initialization (ro root)" return 0 fi ebegin "Updating /etc/mtab" @@ -75,23 +74,15 @@ do_fsck() { root=$(fstabinfo --blockdevice /) [ ! -e "${root}" -a -e /dev/root ] && root=/dev/root - if [ -e /forcefsck ] || get_bootparam "forcefsck"; then - ebegin "Checking root filesystem (full fsck forced)" - fsck ${opts} -f -n "${root}" - # /forcefsck isn't deleted because checkfs needs it. - # it'll be deleted in that script. + # Obey the fs_passno setting for / (see fstab(5)) + local pass=$(fstabinfo --passno /) + if [ ${pass:-0} != "0" ]; then + ebegin "Checking root filesystem" + fsck ${opts} -p "${root}" retval=$? else - # Obey the fs_passno setting for / (see fstab(5)) - local pass=$(fstabinfo --passno /) - if [ ${pass:-0} != "0" ]; then - ebegin "Checking root filesystem" - fsck ${opts} -p "${root}" - retval=$? - else - ebegin "Skipping root filesystem check" "(fstab's passno == 0)" - retval=0 - fi + ebegin "Skipping root filesystem check (fstab's passno == 0)" + retval=0 fi if [ ${retval} -eq 0 ]; then |