Fix a bad comparison operator (s/==/=/), and address a use-case issue where-

in the one-line comment associated with the dumpdev setting was not present
for the case where the user deselects the dumpdev service (restoring pre-
r256348 behaviour.

MFC After:	3 days
This commit is contained in:
Devin Teske 2014-01-18 22:33:49 +00:00
parent 48b2d828a2
commit e06674ffd2

View file

@ -52,16 +52,14 @@ exec 3>&-
havedump=
for daemon in $DAEMONS; do
if [ "$daemon" == "dumpdev" ]; then
havedump=1
echo '# Set dumpdev to "AUTO" to enable crash dumps, "NO"' \
'to disable' >> $BSDINSTALL_TMPETC/rc.conf.services
echo dumpdev=\"AUTO\" >> $BSDINSTALL_TMPETC/rc.conf.services
continue
fi
[ "$daemon" = "dumpdev" ] && havedump=1 continue
echo ${daemon}_enable=\"YES\" >> $BSDINSTALL_TMPETC/rc.conf.services
done
if [ ! "$havedump" ]; then
echo '# Set dumpdev to "AUTO" to enable crash dumps, "NO"' \
'to disable' >> $BSDINSTALL_TMPETC/rc.conf.services
if [ "$havedump" ]; then
echo dumpdev=\"AUTO\" >> $BSDINSTALL_TMPETC/rc.conf.services
else
echo dumpdev=\"NO\" >> $BSDINSTALL_TMPETC/rc.conf.services
fi