diff options
| author | Roy Marples <roy@marples.name> | 2007-07-13 00:04:20 +0000 | 
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2007-07-13 00:04:20 +0000 | 
| commit | cffbaa6c4e90835cf50be79ac304cccf27605b39 (patch) | |
| tree | 6e80b33f3254274f987f47f3c57d7335a278f64d /init.d/checkroot | |
| parent | 639024a04a34dea5e32812ce7c1e9e6f0b5f7e5c (diff) | |
| download | openrc-cffbaa6c4e90835cf50be79ac304cccf27605b39.tar.xz | |
Use echo instead of touch - saves on forking
Diffstat (limited to 'init.d/checkroot')
| -rwxr-xr-x | init.d/checkroot | 7 | 
1 files changed, 2 insertions, 5 deletions
| diff --git a/init.d/checkroot b/init.d/checkroot index a7a8b3eb..a35d4586 100755 --- a/init.d/checkroot +++ b/init.d/checkroot @@ -7,14 +7,11 @@ and optionally repair them."  do_mtab() {  	# Don't create mtab if /etc is readonly -	if ! touch /etc/mtab 2> /dev/null ; then +	if ! echo 2>/dev/null >/etc/mtab ; then  		ewarn "Skipping /etc/mtab initialization" "(ro root?)"  		return 0  	fi -	# Clear the existing mtab -	> /etc/mtab -  	# Add the entry for / to mtab  	mount -f / @@ -43,7 +40,7 @@ do_fsck() {  		return 0  	fi -	if touch /.test.$$ 2> /dev/null ; then +	if echo 2>/dev/null >/.test.$$ ; then  		einfo "root filesystem is mounted read-write - skipping"  		rm -f /.test.$$  		return 0 | 
