diff options
| author | Roy Marples <roy@marples.name> | 2008-02-28 18:43:47 +0000 | 
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-02-28 18:43:47 +0000 | 
| commit | 063563bd4e670622f0a747eeb6cb887487a3d73c (patch) | |
| tree | fb843d1a4692ecb1e391212b0c0f1a8f3526765b /init.d | |
| parent | f092045650faad778d25d000d80b3128664d2e2a (diff) | |
| download | openrc-063563bd4e670622f0a747eeb6cb887487a3d73c.tar.xz | |
Don't abort fsck at shutdown.
Diffstat (limited to 'init.d')
| -rw-r--r-- | init.d/fsck | 11 | 
1 files changed, 9 insertions, 2 deletions
diff --git a/init.d/fsck b/init.d/fsck index c2816b20..212d313c 100644 --- a/init.d/fsck +++ b/init.d/fsck @@ -12,6 +12,11 @@ depend()  	keyword nojail notimeout  } +_abort() { +	exec rc-abort; +	return 1; +} +  start()  {  	local reboot_opts= fsck_opts= p= @@ -44,16 +49,18 @@ start()  		0)       eend 0; return 0;;  		1)       ewend 1 "Filesystems repaired"; return 0;;  		2|3|4)   ewend 1 "Filesystems repaired, but reboot needed" -		         reboot ${reboot_opts}; exec rc-abort; return 1;; +		         reboot ${reboot_opts}; _abort || return 1;;  		8)       ewend 1 "Operational error"; return 0;;  		12)      ewend 1 "fsck interupted"; return 1;;  		*)       eend 2 "Filesystems couldn't be fixed" -		         exec rc-abort; return 1;; +		         _abort || return 1;;  	esac  }  stop()  { +	_abort() { return 0; } # Fake function so we always shutdown correctly. +  	yesno "${fsck_shutdown}" && start  	return 0  }  | 
