Skip to content

Commit

Permalink
Add auto-mount -du to rc.suspend
Browse files Browse the repository at this point in the history
Clean up rc.resume
  • Loading branch information
outpaddling committed Oct 28, 2022
1 parent d984782 commit 72174ac
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions desktop-installer
Original file line number Diff line number Diff line change
Expand Up @@ -564,12 +564,26 @@ moused_config()
auto-enable-service moused desktop-installer

# Moused sometimes crashes during suspend/resume (sig 11)
if ! fgrep -q '/usr/sbin/service moused' $RC_RESUME; then
sed -i '.orig' -E "s|exit 0|# Added by desktop-installer\\
/usr/sbin/service moused restart\\
# End desktop-installer addition\\
\\
exit 0|g" $RC_RESUME
if ! fgrep -q '/usr/local/sbin/auto-fix-date' $RC_RESUME; then
# Insert before last line (should be exit 0)
sed -i .orig '$ i\
# Added by desktop-installer\
/usr/local/sbin/auto-fix-date\
# End desktop-installer addition\
\
' $RC_RESUME
fi

if ! fgrep -q '/usr/sbin/automount -fu' $RC_SUSPEND; then
# Insert before logger, one of the last housekeeping
# chores before zzz
sed -i .orig '/^\/usr\/bin\/logger/i\
# Added by desktop-installer\
# Mounts will cause hangs if we wake up on a different network\
/usr/sbin/automount -fu\
# End desktop-installer addition\
\
' $RC_SUSPEND
fi
fi
else
Expand Down Expand Up @@ -2412,6 +2426,7 @@ DEVFS_RULES='/etc/devfs.rules'
RC_CONF='/etc/rc.conf'
LOADER_CONF='/boot/loader.conf'
RC_RESUME='/etc/rc.resume'
RC_SUSPEND='/etc/rc.suspend'
TTYS='/etc/ttys'
FSTAB='/etc/fstab'
NASD_CONF="$LOCALBASE/etc/nasd.conf"
Expand Down

0 comments on commit 72174ac

Please sign in to comment.