From 075e80b358b3ea10c9a66caf6dd38c4ddc89f82c Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 25 Jul 2007 20:58:23 +0000 Subject: Merge some of reb's OpenBSD fixes in --- init.d/localmount | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'init.d/localmount') 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 $? -- cgit v1.2.3