diff --git a/sysrc-q.patch b/sysrc-q.patch new file mode 100644 diff --git a/usr.sbin/sysrc/sysrc b/usr.sbin/sysrc/sysrc --- a/usr.sbin/sysrc/sysrc +++ b/usr.sbin/sysrc/sysrc @@ -852,19 +852,23 @@ # If `-N' is passed, simplify the output # if [ ! "$SHOW_VALUE" ]; then - echo "$NAME" + if [ ! "$QUIET" ]; then + echo "$NAME" + fi f_sysrc_set "$NAME" "$new" || status=$FAILURE else if f_sysrc_set "$NAME" "$new"; then - if [ "$SHOW_FILE" ]; then - after=$( f_sysrc_find "$NAME" ) - else - after=$( f_sysrc_get "$NAME" ) + if [ ! "$QUIET" ]; then + if [ "$SHOW_FILE" ]; then + after=$( f_sysrc_find "$NAME" ) + else + after=$( f_sysrc_get "$NAME" ) + fi + echo -n "${SHOW_NAME:+$NAME$SEP}" + echo -n "$before${SHOW_EQUALS:+\" #}" + echo -n " -> ${SHOW_EQUALS:+\"}$after" + echo "${SHOW_EQUALS:+\"}" fi - echo -n "${SHOW_NAME:+$NAME$SEP}" - echo -n "$before${SHOW_EQUALS:+\" #}" - echo -n " -> ${SHOW_EQUALS:+\"}$after" - echo "${SHOW_EQUALS:+\"}" else status=$FAILURE fi