From e06674ffd2be5f614ddb568f3d3ec5d4cc17bebc Mon Sep 17 00:00:00 2001 From: Devin Teske Date: Sat, 18 Jan 2014 22:33:49 +0000 Subject: [PATCH] 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 --- usr.sbin/bsdinstall/scripts/services | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/services b/usr.sbin/bsdinstall/scripts/services index 3297407e111..f64271588de 100755 --- a/usr.sbin/bsdinstall/scripts/services +++ b/usr.sbin/bsdinstall/scripts/services @@ -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 -- 2.45.2