Changeset View
Changeset View
Standalone View
Standalone View
libexec/rc/rc.d/cfumass
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | ctladm create -b block -o file="${cfumass_image}" -o readonly=on \ | ||||
-o vendor="${cfumass_vendor}" -o product="${cfumass_product}" \ | -o vendor="${cfumass_vendor}" -o product="${cfumass_product}" \ | ||||
-S 0 > /dev/null | -S 0 > /dev/null | ||||
err=$? | err=$? | ||||
if [ "${err}" -ne 0 ]; then | if [ "${err}" -ne 0 ]; then | ||||
warn "unable to create CTL LUN" | warn "unable to create CTL LUN" | ||||
return "${err}" | return "${err}" | ||||
fi | fi | ||||
load_kld -e cfumass cfumass | load_kld cfumass | ||||
# If the template is already switched to Mass Storage, then reset | # If the template is already switched to Mass Storage, then reset | ||||
# it to -1 to force the host to reenumerate it; otherwise it might | # it to -1 to force the host to reenumerate it; otherwise it might | ||||
# not notice the new LUN. | # not notice the new LUN. | ||||
_template=`sysctl -n hw.usb.template` | _template=`sysctl -n hw.usb.template` | ||||
if [ "${_template}" -eq 0 ]; then | if [ "${_template}" -eq 0 ]; then | ||||
sysctl hw.usb.template=-1 > /dev/null | sysctl hw.usb.template=-1 > /dev/null | ||||
err=$? | err=$? | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |