From nobody Wed Jun 28 16:53:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QrnhZ56v6z4ks5h; Wed, 28 Jun 2023 16:53:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QrnhZ4f1dz3M17; Wed, 28 Jun 2023 16:53:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687971198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P1myLr/qE40ur5iVaor3ye+Gvr3zIE+A+OfNcRDrYPM=; b=ZMKdBrlo4XfsCeLjZJrwTuI8Rv3seBQMaNvKnkH1iXpqvHvmEZXXTEvwJGQiH5g4GIvPkw bfKGoiQ2h6KNnYtQxDzqNwqpq70y03/jlzpNZ5uShOORqUmpFkuSD9db2tzF5M1bPh2ISN VuogmEUdgikJnGFZAWESob5uH1jz0XFfXQQfs8+noJIU3QK98yUmpujlh/Bw4NH0ZVmBHI S+2BhJTC/v1EXsH2bDT3b8t7tk+IydHP0udo1VvKZvM669YOFgH04n7hVHvOPLNQCP8LdM N/TmB+Hv+pD3WCO4byjgTLYiyacke+gYMJ9Jn4ir4cSH9EkEqnI9c6bqQh2VxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687971198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P1myLr/qE40ur5iVaor3ye+Gvr3zIE+A+OfNcRDrYPM=; b=wgqPyycUCzcJdxcGCmEM5y3FranNEMSzqfYTiOAedzvIZ/E8YFcVKuNStZanzNjRt5SaEG GqjugPw5jerzRJ2o6M7yIkmRRvm1uDTwUSNVdicCuHR+SGP8Yp57DOV3f4kM8fyTIkq2KK 8Pv3wk9XarXGAF6AjeoNNzjuvpvtrfkInj8On3blJS9nBAqlYp/T6+QB+uNGnvQn1NL/AU L0VFpVJl4cXU3f5tkKDYSVz0rSu4DETUNfq13WW6iaYIX1NARTIAxYCxYSegpkEPCbszCk f4RWslD0S3z1GhQvIPngwFvh4miRXFWeIdzgCcw/g1MOviOmAjb4vfnfhqbt+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687971198; a=rsa-sha256; cv=none; b=rqrMF1UTT0O6yM6WVuDOnFqg4jxvs+RRAJw6KY9G9B+WEM5hPsZ8bD+kL1kWhYBgPh1QwD Un51BhDsMS+nWO92nC/0jfmIUuxfjtRAwt9UXOW8EqlZawkMhzQjnaxStNlQLQZK/GkenX DWKT55IDPzxvp/reJndf9IjggZX2nqzFRfcFVR4rkH6DQyyEzLfHE4i85eJg/13SQkGXcc Swfhl1N1MTKuHHxGdYDi3Pt2wCRoh26l1hC58dseLFqTNyn8AW/W4yFY6+DaSxjDBYYRBN eu0RNL5k1vNwE5iBPvBuZ60qAGLdqQUxl1dT5wRfQoGeiXrodnQu1DHlj6zYrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrnhZ3jmrzhYy; Wed, 28 Jun 2023 16:53:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SGrIvv074751; Wed, 28 Jun 2023 16:53:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SGrIM5074750; Wed, 28 Jun 2023 16:53:18 GMT (envelope-from git) Date: Wed, 28 Jun 2023 16:53:18 GMT Message-Id: <202306281653.35SGrIM5074750@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Benedict Reuschling Subject: git: 7776cec946fb - main - Add quotes around variables and replace backticks with $() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bcr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7776cec946fbb3a087ace68468c290572398dce9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bcr: URL: https://cgit.FreeBSD.org/src/commit/?id=7776cec946fbb3a087ace68468c290572398dce9 commit 7776cec946fbb3a087ace68468c290572398dce9 Author: Benedict Reuschling AuthorDate: 2023-06-28 16:48:39 +0000 Commit: Benedict Reuschling CommitDate: 2023-06-28 16:48:39 +0000 Add quotes around variables and replace backticks with $() The quotes are added to prevent word splits and globbing. Some whitespaces were also removed after variables. Approved by: imp Differential Revision: https://reviews.freebsd.org/D40726 --- usr.sbin/zzz/zzz.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.sbin/zzz/zzz.sh b/usr.sbin/zzz/zzz.sh index ef9527bb76b3..d4311ac82302 100644 --- a/usr.sbin/zzz/zzz.sh +++ b/usr.sbin/zzz/zzz.sh @@ -18,18 +18,18 @@ APM_SUSPEND_DELAY=machdep.apm_suspend_delay # Check for ACPI support if sysctl $ACPI_SUSPEND_STATE >/dev/null 2>&1; then # Get configured suspend state - SUSPEND_STATE=`sysctl -n $ACPI_SUSPEND_STATE ` + SUSPEND_STATE=$(sysctl -n $ACPI_SUSPEND_STATE) # Get list of supported suspend states - SUPPORTED_STATES=`sysctl -n $ACPI_SUPPORTED_STATES ` + SUPPORTED_STATES=$(sysctl -n $ACPI_SUPPORTED_STATES) # Check if the configured suspend state is supported by the system - if echo $SUPPORTED_STATES | grep $SUSPEND_STATE >/dev/null; then + if echo "$SUPPORTED_STATES" | grep "$SUSPEND_STATE" >/dev/null; then # execute ACPI style suspend command - exec acpiconf -s $SUSPEND_STATE + exec acpiconf -s "$SUSPEND_STATE" else echo -n "Requested suspend state $SUSPEND_STATE " - echo -n "is not supported. " + echo -n "is not supported." echo "Supported states: $SUPPORTED_STATES" fi # Check for APM support