diff --git a/libexec/rc/rc.suspend b/libexec/rc/rc.suspend --- a/libexec/rc/rc.suspend +++ b/libexec/rc/rc.suspend @@ -43,15 +43,28 @@ echo $$ 2> /dev/null > /var/run/rc.suspend.pid -# If you have troubles on suspending with PC-CARD modem, try this. -# See also contrib/pccardq.c (Only for PAO users). -# pccardq | awk -F '~' '$5 == "filled" && $4 ~ /uart/ \ -# { printf("pccardc power %d 0", $1); }' | sh - # If a device driver has problems suspending, try unloading it before # suspend and reloading it on resume. Example: # kldunload usb +. /etc/rc.subr + +load_rc_config + +rcorder_opts="-k suspend" + +case ${local_startup} in +[Nn][Oo] | '') ;; +*) find_local_scripts_new ;; +esac + +files=`rcorder ${rcorder_opts} /etc/rc.d/* ${local_rc} 2>/dev/null` + +for _rc_elem in $files; do + debug "run_rc_script $_rc_elem suspend" + run_rc_script $_rc_elem suspend +done + /usr/bin/logger -t $subsystem suspend at `/bin/date +'%Y%m%d %H:%M:%S'` /bin/sync && /bin/sync && /bin/sync /bin/sleep 3