diff options
| author | Roy Marples <roy@marples.name> | 2007-07-25 20:58:23 +0000 | 
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2007-07-25 20:58:23 +0000 | 
| commit | 075e80b358b3ea10c9a66caf6dd38c4ddc89f82c (patch) | |
| tree | 21ffbe2ad35c5da99b05d5a961fe0d391af29310 /init.d/localmount | |
| parent | af2d9995d78c0ac019f047e235eba71e421b83cf (diff) | |
| download | openrc-075e80b358b3ea10c9a66caf6dd38c4ddc89f82c.tar.xz | |
Merge some of reb's OpenBSD fixes in
Diffstat (limited to 'init.d/localmount')
| -rwxr-xr-x | init.d/localmount | 22 | 
1 files changed, 13 insertions, 9 deletions
diff --git a/init.d/localmount b/init.d/localmount index ff841a2e..7e20c3df 100755 --- a/init.d/localmount +++ b/init.d/localmount @@ -21,9 +21,9 @@ start() {  	mount -at "${types}"  	eend $? "Some local filesystem failed to mount" -	# Change the mount options of already mounted paritions +	# Change the mount options of already mounted partitions  	# This is needed when /usr is separate and coming back from single user -	if [ "${RC_UNAME}" != "Linux" ] ; then +	if [ "${RC_UNAME}" = "FreeBSD" ] ; then  		mount -uao fstab -t "${types},linprocfs"  	fi @@ -34,13 +34,17 @@ start() {  			chmod 700 "${dumpdir}"  		fi -		# Don't quote ${KERNEL_DUMP_DEVICE}, so that if it's unset, savecore -		# will check on the partitions listed in fstab without errors in the -		# output -		if savecore -C "${dumpdir}" ${KERNEL_DUMP_DEVICE} >/dev/null ; then -			local savecoreopts="${dumpdir} ${KERNEL_DUMP_DEVICE}" -			[ "${KERNEL_DUMP_COMPRESS}" = "yes" ] \ -				&& savecoreopts="-z ${savecoreopts}" +		if [ "${RC_UNAME}" = "FreeBSD" ] ; then +			# Don't quote ${KERNEL_DUMP_DEVICE}, so that if it's unset, +			# savecore will check on the partitions listed in fstab +			# without errors in the output +			savecore -C "${dumpdir}" ${KERNEL_DUMP_DEVICE} >/dev/null +		else +			ls "${dumpdir}"/bsd* > /dev/null 2>&1 +		fi +		if [ $? = 0 ] ; then +			local sopts="${dumpdir} ${KERNEL_DUMP_DEVICE}" +			[ "${KERNEL_DUMP_COMPRESS}" = "yes" ] && sopts="-z ${sopts}"  			ebegin "Saving kernel core dump in" "${dumpdir}"  			savecore ${savecoreopts} >/dev/null  			eend $?  | 
