Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add our /etc/rc and /etc/rc.resume changes

  • Loading branch information...
commit 2cd3e7a27e9bbab8fed41aa3d09631b5598f5844 1 parent 74aced1
@kmoore134 kmoore134 authored
Showing with 65 additions and 12 deletions.
  1. +57 −10 etc/rc
  2. +8 −2 etc/rc.resume
View
67 etc/rc
@@ -96,22 +96,69 @@ done
unset files local_rc
-# Now that disks are mounted, for each dir in $local_startup
-# search for init scripts that use the new rc.d semantics.
-#
-case ${local_startup} in
-[Nn][Oo] | '') ;;
-*) find_local_scripts_new ;;
-esac
+# Check if we are needing to finish up a freebsd-update
+if [ -e "/var/.freebsd-update-finish" ] ; then
+ TERM="cons25" ; export TERM
+ clear
+ echo "Installing FreeBSD updates... Please wait..."
+ /usr/sbin/freebsd-update --non-interactive install
+ if [ -e "/usr/local/bin/pc-softwaremanager" ] ; then
+ /usr/local/bin/pc-extractoverlay desktop
+ else
+ /usr/local/bin/pc-extractoverlay server
+ fi
+ echo "Press ENTER to continue"
+ read tmp
+fi
-files=`rcorder ${skip} /etc/rc.d/* ${local_rc} 2>/dev/null`
-for _rc_elem in ${files}; do
+if [ "$fastboot_enable" = "YES" ]; then
+ # We are fast-booting
+
+ # List of rc.d scripts we will start before login
+ preLoad="/etc/rc.d/hostname /etc/rc.d/random /etc/rc.d/adjkerntz /etc/rc.d/cleanvar /etc/rc.d/hostid /etc/rc.d/ldconfig /etc/rc.d/zfs /etc/rc.d/zvol /etc/rc.d/cleartmp $fastboot_earlyrc "
+
+ # Start loopback device
+ /etc/rc.d/netif start lo0
+
+ # Run the early scripts now
+ for i in $preLoad
+ do
+ run_rc_script ${i} ${_boot}
+ done
+
+ # Check for USB mouse to start
+ mChk="ums0 ums1"
+ for i in $mChk
+ do
+ if [ -e "/dev/$i" ] ; then
+ /etc/rc.d/moused start $i
+ fi
+ done
+
+ # Start the delayed services after the login is up
+ (sleep 5; nice /bin/sh /etc/rc.delay "$_rc_elem_done$preLoad")&
+else
+ # Performing a normal startup
+
+ # Now that disks are mounted, for each dir in $local_startup
+ # search for init scripts that use the new rc.d semantics.
+ #
+
+ case ${local_startup} in
+ [Nn][Oo] | '') ;;
+ *) find_local_scripts_new ;;
+ esac
+
+ files=`rcorder ${skip} /etc/rc.d/* ${local_rc} 2>/dev/null`
+ for _rc_elem in ${files}; do
case "$_rc_elem_done" in
*" $_rc_elem "*) continue ;;
esac
run_rc_script ${_rc_elem} ${_boot}
-done
+ done
+
+fi
echo ''
date
View
10 etc/rc.resume
@@ -24,7 +24,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $FreeBSD$
+# $FreeBSD: releng/9.1/etc/rc.resume 232083 2012-02-23 22:10:49Z jkim $
#
# sample run command file for APM Resume Event
@@ -54,9 +54,15 @@ fi
# wpa_supplicant(8) doesn't seem to reassociate during resume. Uncomment
# the following to signal it to reassociate.
-# /usr/sbin/wpa_cli reassociate
+ifconfig | grep -q 'wlan[0-9]:'
+if [ $? -eq 0 ] ; then
+ /usr/sbin/wpa_cli reassociate
+fi
/usr/bin/logger -t $subsystem resumed at `/bin/date +'%Y%m%d %H:%M:%S'`
/bin/sync && /bin/sync && /bin/sync
+# Restart moused to fix suspend
+/etc/rc.d/moused restart
+
exit 0
Please sign in to comment.
Something went wrong with that request. Please try again.