/[baselayout]/trunk/init.d/localmount
Gentoo

Diff of /trunk/init.d/localmount

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2793 Revision 2794
19 19
20 ebegin "Mounting local filesystems" 20 ebegin "Mounting local filesystems"
21 mount -at "${types}" 21 mount -at "${types}"
22 eend $? "Some local filesystem failed to mount" 22 eend $? "Some local filesystem failed to mount"
23 23
24 # Change the mount options of already mounted paritions 24 # Change the mount options of already mounted partitions
25 # This is needed when /usr is separate and coming back from single user 25 # This is needed when /usr is separate and coming back from single user
26 if [ "${RC_UNAME}" != "Linux" ] ; then 26 if [ "${RC_UNAME}" = "FreeBSD" ] ; then
27 mount -uao fstab -t "${types},linprocfs" 27 mount -uao fstab -t "${types},linprocfs"
28 fi 28 fi
29 29
30 if [ -x /sbin/savecore ] ; then 30 if [ -x /sbin/savecore ] ; then
31 local dumpdir=${KERNEL_DUMP_DIR:-/var/crash} 31 local dumpdir=${KERNEL_DUMP_DIR:-/var/crash}
32 if ! [ -d "${dumpdir}" ]; then 32 if ! [ -d "${dumpdir}" ]; then
33 mkdir -p "${dumpdir}" 33 mkdir -p "${dumpdir}"
34 chmod 700 "${dumpdir}" 34 chmod 700 "${dumpdir}"
35 fi 35 fi
36 36
37 if [ "${RC_UNAME}" = "FreeBSD" ] ; then
37 # Don't quote ${KERNEL_DUMP_DEVICE}, so that if it's unset, savecore 38 # Don't quote ${KERNEL_DUMP_DEVICE}, so that if it's unset,
38 # will check on the partitions listed in fstab without errors in the 39 # savecore will check on the partitions listed in fstab
39 # output 40 # without errors in the output
40 if savecore -C "${dumpdir}" ${KERNEL_DUMP_DEVICE} >/dev/null ; then 41 savecore -C "${dumpdir}" ${KERNEL_DUMP_DEVICE} >/dev/null
42 else
43 ls "${dumpdir}"/bsd* > /dev/null 2>&1
44 fi
45 if [ $? = 0 ] ; then
41 local savecoreopts="${dumpdir} ${KERNEL_DUMP_DEVICE}" 46 local sopts="${dumpdir} ${KERNEL_DUMP_DEVICE}"
42 [ "${KERNEL_DUMP_COMPRESS}" = "yes" ] \ 47 [ "${KERNEL_DUMP_COMPRESS}" = "yes" ] && sopts="-z ${sopts}"
43 && savecoreopts="-z ${savecoreopts}"
44 ebegin "Saving kernel core dump in" "${dumpdir}" 48 ebegin "Saving kernel core dump in" "${dumpdir}"
45 savecore ${savecoreopts} >/dev/null 49 savecore ${savecoreopts} >/dev/null
46 eend $? 50 eend $?
47 fi 51 fi
48 fi 52 fi

Legend:
Removed from v.2793  
changed lines
  Added in v.2794

  ViewVC Help
Powered by ViewVC 1.1.20