From patchwork Sat Dec 21 05:32:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Ward X-Patchwork-Id: 11306789 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B97F5921 for ; Sat, 21 Dec 2019 05:34:15 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 452F521655 for ; Sat, 21 Dec 2019 05:34:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="mTjeDl/Y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 452F521655 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ll.mit.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9F61B1657; Sat, 21 Dec 2019 06:33:21 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9F61B1657 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1576906451; bh=Lpj/nXacpETPceDEKD3TzEbrdQvNoPF6UBviLhdsjrA=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=mTjeDl/Y/Vd6otlqZ3InTDpJXlbnMh80176CqvAIs+rQuQwRaxAi1tsMqY11XD82M 2b/27D4T9V55rfxVFPdQ4QR6grVClrP09MBCSsPV2OWBwXzGjj4xyo0E6jAURzwCCA 8GjH9zaQx0BVHYYQe4DZkkqPz543yDd70mNEGDOo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 56306F800E0; Sat, 21 Dec 2019 06:32:31 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id B32CCF8023F; Sat, 21 Dec 2019 06:32:23 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, SURBL_BLOCKED,UNPARSEABLE_RELAY autolearn=disabled version=3.4.0 Received: from llmx3.ll.mit.edu (llmx3.ll.mit.edu [129.55.12.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 23E94F800BC for ; Sat, 21 Dec 2019 06:32:19 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 23E94F800BC Received: from LLE2K16-MBX03.mitll.ad.local (LLE2K16-MBX03.mitll.ad.local) by llmx3.ll.mit.edu (unknown) with ESMTPS id xBL5WIK4022886 for ; Sat, 21 Dec 2019 00:32:18 -0500 From: David Ward To: Date: Sat, 21 Dec 2019 00:32:01 -0500 Message-ID: <1576906331-5212-2-git-send-email-david.ward@ll.mit.edu> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> References: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-12-20_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912210045 Cc: David Ward Subject: [alsa-devel] [PATCH alsa-utils 01/11] alsa-info.sh: Consolidate PCI device output X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Include numeric IDs and subsystem info in the PCI device output, without placing them in a separate section. Signed-off-by: David Ward --- alsa-info/alsa-info.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh index cf7ad89..8fc6997 100755 --- a/alsa-info/alsa-info.sh +++ b/alsa-info/alsa-info.sh @@ -455,7 +455,9 @@ fi cat /proc/asound/modules 2>/dev/null | awk '{ print $2 }' > $TEMPDIR/alsamodules.tmp cat /proc/asound/cards > $TEMPDIR/alsacards.tmp if [[ ! -z "$LSPCI" ]]; then - lspci | grep -i "multi\|audio">$TEMPDIR/lspci.tmp + for class in 0401 0402 0403; do + lspci -vvnn -d "::$class" | sed -n '/^[^\t]/,+1p' + done > $TEMPDIR/lspci.tmp fi #Check for HDA-Intel cards codec#* @@ -585,12 +587,6 @@ echo "" >> $FILE cat $TEMPDIR/lspci.tmp >> $FILE echo "" >> $FILE echo "" >> $FILE -echo "!!Advanced information - PCI Vendor/Device/Subsystem ID's" >> $FILE -echo "!!-------------------------------------------------------" >> $FILE -echo "" >> $FILE -lspci -vvn |grep -A1 040[1-3] >> $FILE -echo "" >> $FILE -echo "" >> $FILE fi if [ "$SNDOPTIONS" ] From patchwork Sat Dec 21 05:32:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Ward X-Patchwork-Id: 11306791 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A6650921 for ; Sat, 21 Dec 2019 05:35:01 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 37F4721655 for ; Sat, 21 Dec 2019 05:35:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="X2oWBHwm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 37F4721655 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ll.mit.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id CE9AC1668; Sat, 21 Dec 2019 06:34:08 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CE9AC1668 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1576906499; bh=FCbVFqF12Pp6BEXNfeIPnlvyd2j0FQHhi5Kfz/EFWk4=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=X2oWBHwmjgseEmGkwm/bUh4MD/xGoXF/he6uWjYzp9rsT30Gbf4kerIohMN3z99UG OmqdlVdm23NNcaBMBue3NLU2zQMyqjkoCKBC35PAdQZihdhxN/GysSfvYWU1eUHoZq Hly98W86MTdb0qU0IYjsLakliaaxvK0+OCe8pd08= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 46329F80266; Sat, 21 Dec 2019 06:32:34 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 53EE3F80253; Sat, 21 Dec 2019 06:32:25 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, SURBL_BLOCKED,UNPARSEABLE_RELAY autolearn=disabled version=3.4.0 Received: from llmx2.ll.mit.edu (llmx2.ll.mit.edu [129.55.12.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4619DF80218 for ; Sat, 21 Dec 2019 06:32:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4619DF80218 Received: from LLE2K16-MBX03.mitll.ad.local (LLE2K16-MBX03.mitll.ad.local) by llmx2.ll.mit.edu (unknown) with ESMTPS id xBL5WJS0023803 for ; Sat, 21 Dec 2019 00:32:19 -0500 From: David Ward To: Date: Sat, 21 Dec 2019 00:32:02 -0500 Message-ID: <1576906331-5212-3-git-send-email-david.ward@ll.mit.edu> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> References: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-12-20_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=931 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912210045 Cc: David Ward Subject: [alsa-devel] [PATCH alsa-utils 02/11] alsa-info.sh: Read from /proc/modules and sort the result X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Sorting the list of loaded modules makes it much easier to compare two alsa-info.txt files, even if they are both from the same system (since the order actually changes after each reboot). lsmod just formats the contents of /proc/modules. After this script calls lsmod, it strips everything but module names from the output. This same result can be obtained just as easily by reading directly from /proc/modules; then there is no need to remove the header line printed by lsmod before sorting the output. Signed-off-by: David Ward --- alsa-info/alsa-info.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh index 8fc6997..ed1d9e2 100755 --- a/alsa-info/alsa-info.sh +++ b/alsa-info/alsa-info.sh @@ -35,7 +35,7 @@ BGTITLE="ALSA-Info v $SCRIPT_VERSION" PASTEBINKEY="C9cRIO8m/9y8Cs0nVs0FraRx7U0pHsuc" WGET=$(which wget 2>/dev/null | sed 's|^[^/]*||' 2>/dev/null) -REQUIRES="mktemp grep pgrep whereis ping awk date uname cat dmesg amixer alsactl" +REQUIRES="mktemp grep pgrep whereis ping awk date uname cat sort dmesg amixer alsactl" # # Define some simple functions @@ -131,11 +131,11 @@ withaplay() { echo "" >> $FILE } -withlsmod() { +withmodules() { echo "!!All Loaded Modules" >> $FILE echo "!!------------------" >> $FILE echo "" >> $FILE - lsmod | awk '{print $1}' >> $FILE + awk '{print $1}' < /proc/modules | sort >> $FILE echo "" >> $FILE echo "" >> $FILE } @@ -254,7 +254,7 @@ withall() { withaplay withamixer withalsactl - withlsmod + withmodules withsysfs withdmesg WITHALL="no" @@ -366,7 +366,6 @@ information about your ALSA installation and sound related hardware. dmesg lspci - lsmod aplay amixer alsactl From patchwork Sat Dec 21 05:32:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Ward X-Patchwork-Id: 11306795 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C9C95921 for ; Sat, 21 Dec 2019 05:36:17 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 51B7721D7D for ; Sat, 21 Dec 2019 05:36:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="iuqXVYLn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 51B7721D7D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ll.mit.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8BA2D1672; Sat, 21 Dec 2019 06:35:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8BA2D1672 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1576906575; bh=D2/tZoidpaAfhORH4ChxqVhz4/Ew2CrSi/bzwKHDV3Y=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=iuqXVYLnFm0deP41DQXTtrkZGo6kj+/5UvurQiNIYkHQf2lDaXuWFmZ15I8D/dKK5 A53wCDjwUC4c/OM5FR8i9FillZiO0Y7wYwZg6r/iyNBUbNK/uPE1kmsY5BPxuMzUn+ siY9xA7Aa08PzsyseKI3J32WqlVbQrIPhNXJi2vw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E2F92F8026A; Sat, 21 Dec 2019 06:32:38 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id C4A32F80256; Sat, 21 Dec 2019 06:32:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, SURBL_BLOCKED, UNPARSEABLE_RELAY, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from llmx3.ll.mit.edu (llmx3.ll.mit.edu [129.55.12.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C2706F800BC for ; Sat, 21 Dec 2019 06:32:22 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C2706F800BC Received: from LLE2K16-MBX03.mitll.ad.local (LLE2K16-MBX03.mitll.ad.local) by llmx3.ll.mit.edu (unknown) with ESMTPS id xBL5WKme023210 for ; Sat, 21 Dec 2019 00:32:20 -0500 From: David Ward To: Date: Sat, 21 Dec 2019 00:32:03 -0500 Message-ID: <1576906331-5212-4-git-send-email-david.ward@ll.mit.edu> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> References: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-12-20_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912210045 Cc: David Ward Subject: [alsa-devel] [PATCH alsa-utils 03/11] alsa-info.sh: Simplify iteration over cards when calling amixer X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Read card names directly from individual procfs files, and pass them to amixer using the '-c' option. Signed-off-by: David Ward --- alsa-info/alsa-info.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh index ed1d9e2..e1067d4 100755 --- a/alsa-info/alsa-info.sh +++ b/alsa-info/alsa-info.sh @@ -144,12 +144,12 @@ withamixer() { echo "!!Amixer output" >> $FILE echo "!!-------------" >> $FILE echo "" >> $FILE - for i in $(grep "]: " /proc/asound/cards | awk -F ' ' '{ print $1 }') ; do - CARD_NAME=$(grep "^ *$i " $TEMPDIR/alsacards.tmp | awk '{ print $2 }') - echo "!!-------Mixer controls for card $i $CARD_NAME]" >> $FILE + for f in /proc/asound/card*/id; do + [ -f "$f" ] && read -r CARD_NAME < "$f" || continue + echo "!!-------Mixer controls for card $CARD_NAME" >> $FILE echo "" >>$FILE - amixer -c$i info >> $FILE 2>&1 - amixer -c$i >> $FILE 2>&1 + amixer -c "$CARD_NAME" info >> $FILE 2>&1 + amixer -c "$CARD_NAME" >> $FILE 2>&1 echo "" >> $FILE done echo "" >> $FILE From patchwork Sat Dec 21 05:32:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Ward X-Patchwork-Id: 11306793 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2D4C2921 for ; Sat, 21 Dec 2019 05:35:46 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B9C1421D7D for ; Sat, 21 Dec 2019 05:35:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="L8nt6ig2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B9C1421D7D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ll.mit.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DFB6D165E; Sat, 21 Dec 2019 06:34:53 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DFB6D165E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1576906544; bh=QWP4PbepaMgW6cSosEYrQix0vVgELIk4+JYM9pE88z8=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=L8nt6ig2OgftDgPnf9U4Hwg3lZebYUKJyi81ETrKLoraJYbvcfJNe3pa+ed+lBkdN uzzPhYnsHIOQ26h0dUgAP4emmJzH7R0SI3N4r+MMPUgKs5qbtKnIgVWCAMz8I31aci MCeNJqX3MbL/MOQUlTsNffaXIYuWi9g0uObzcx+Y= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 295C1F80273; Sat, 21 Dec 2019 06:32:37 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 91D99F80266; Sat, 21 Dec 2019 06:32:27 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, SURBL_BLOCKED,UNPARSEABLE_RELAY autolearn=disabled version=3.4.0 Received: from llmx2.ll.mit.edu (llmx2.ll.mit.edu [129.55.12.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 021F2F80234 for ; Sat, 21 Dec 2019 06:32:23 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 021F2F80234 Received: from LLE2K16-MBX03.mitll.ad.local (LLE2K16-MBX03.mitll.ad.local) by llmx2.ll.mit.edu (unknown) with ESMTPS id xBL5WMxF023811 for ; Sat, 21 Dec 2019 00:32:22 -0500 From: David Ward To: Date: Sat, 21 Dec 2019 00:32:04 -0500 Message-ID: <1576906331-5212-5-git-send-email-david.ward@ll.mit.edu> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> References: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-12-20_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=866 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912210045 Cc: David Ward Subject: [alsa-devel] [PATCH alsa-utils 04/11] alsa-info.sh: Use existing function to print ALSA configuration files X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Signed-off-by: David Ward --- alsa-info/alsa-info.sh | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh index e1067d4..bf353de 100755 --- a/alsa-info/alsa-info.sh +++ b/alsa-info/alsa-info.sh @@ -710,33 +710,8 @@ if [ -n "$1" ]; then WITHALL="no" ;; --with-configs) + withconfigs WITHALL="no" - if [[ -e $HOME/.asoundrc ]] || [[ -e /etc/asound.conf ]] - then - echo "!!ALSA configuration files" >> $FILE - echo "!!------------------------" >> $FILE - echo "" >> $FILE - - #Check for ~/.asoundrc - if [[ -e $HOME/.asoundrc ]] - then - echo "!!User specific config file ($HOME/.asoundrc)" >> $FILE - echo "" >> $FILE - cat $HOME/.asoundrc >> $FILE - echo "" >> $FILE - echo "" >> $FILE - fi - - #Check for /etc/asound.conf - if [[ -e /etc/asound.conf ]] - then - echo "!!System wide config file (/etc/asound.conf)" >> $FILE - echo "" >> $FILE - cat /etc/asound.conf >> $FILE - echo "" >> $FILE - echo "" >> $FILE - fi - fi ;; --stdout) UPLOAD="no" From patchwork Sat Dec 21 05:32:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Ward X-Patchwork-Id: 11306797 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7DD25109A for ; Sat, 21 Dec 2019 05:36:49 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0981E21775 for ; Sat, 21 Dec 2019 05:36:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="gH7HwPUD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0981E21775 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ll.mit.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3D90B1674; Sat, 21 Dec 2019 06:35:57 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3D90B1674 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1576906607; bh=zwhHXXDGpId63fIhLi9k2XHtIbgorAei+BkoSYE9Duc=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=gH7HwPUD2UYQMQze1/0bgYTujZkuWZ1JnhLpvx3FZXPEha4XposIFyxuN5rk0+70J uTeHaKNtNqw8jSyThGim9Ymswsna5pV4VpVQ+OlLIz8dQ5+20x2VwC0/WwdUWFcPLW ZWcI5+LiHg2keC+CJQFSVWEpQDoeAM0AqYbd4hcE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 976CBF8027D; Sat, 21 Dec 2019 06:32:40 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id B53D2F80268; Sat, 21 Dec 2019 06:32:29 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, SURBL_BLOCKED,UNPARSEABLE_RELAY autolearn=disabled version=3.4.0 Received: from llmx3.ll.mit.edu (llmx3.ll.mit.edu [129.55.12.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1A26AF800E0 for ; Sat, 21 Dec 2019 06:32:24 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1A26AF800E0 Received: from LLE2K16-MBX03.mitll.ad.local (LLE2K16-MBX03.mitll.ad.local) by llmx3.ll.mit.edu (unknown) with ESMTPS id xBL5WNnD023217 for ; Sat, 21 Dec 2019 00:32:23 -0500 From: David Ward To: Date: Sat, 21 Dec 2019 00:32:05 -0500 Message-ID: <1576906331-5212-6-git-send-email-david.ward@ll.mit.edu> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> References: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-12-20_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912210045 Cc: David Ward Subject: [alsa-devel] [PATCH alsa-utils 05/11] alsa-info.sh: Exit script after writing information to stdout X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The '--stdout' option is mutually exclusive with uploading the file. Signed-off-by: David Ward --- alsa-info/alsa-info.sh | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh index bf353de..372d7ae 100755 --- a/alsa-info/alsa-info.sh +++ b/alsa-info/alsa-info.sh @@ -349,9 +349,7 @@ case "$1" in ;; --stdout) DIALOG="" - UPLOAD="no" WELCOME="no" - TOSTDOUT="yes" ;; esac done @@ -720,6 +718,7 @@ if [ -n "$1" ]; then fi cat $FILE rm $FILE + exit ;; --about) echo "Written/Tested by the following users of #alsa on irc.freenode.net:" @@ -793,10 +792,8 @@ fi if [ "$UPLOAD" = "no" ]; then - if [ -z "$TOSTDOUT" ]; then - mv -f $FILE $NFILE || exit 1 - KEEP_OUTPUT="yes" - fi + mv -f $FILE $NFILE || exit 1 + KEEP_OUTPUT="yes" if [[ -n $DIALOG ]] then @@ -815,11 +812,9 @@ if [ "$UPLOAD" = "no" ]; then echo "Your ALSA information is in $NFILE" echo "" else - if [ -z "$TOSTDOUT" ]; then - echo "" - echo "Your ALSA information is in $NFILE" - echo "" - fi + echo "" + echo "Your ALSA information is in $NFILE" + echo "" fi fi From patchwork Sat Dec 21 05:32:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Ward X-Patchwork-Id: 11306799 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 76638921 for ; Sat, 21 Dec 2019 05:37:36 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0CA0A2070B for ; Sat, 21 Dec 2019 05:37:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="tQmB9VFw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0CA0A2070B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ll.mit.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 27EFD1678; Sat, 21 Dec 2019 06:36:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 27EFD1678 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1576906654; bh=eRuAIU2GQGX7/23LG+RVDt3BDufUqh3o9zSgs/nlRlM=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=tQmB9VFwr+PkmviQFEMaE++0p0/9t9GWOLKDUXeBBq8MCThWHaI9VxTX7a97ZIem7 60R4nQM8lVSfVKknqt+pTfaLfzMG6MgYUs8n/PiH1SRZMkKI929qRTvpbpVZfnB/4y VGwMxAWqa/ZQBOSE+/vHQ88hKTottDY9PGaZDNXo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B1C4BF80290; Sat, 21 Dec 2019 06:32:42 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id ED2BBF80271; Sat, 21 Dec 2019 06:32:31 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, SURBL_BLOCKED,UNPARSEABLE_RELAY autolearn=disabled version=3.4.0 Received: from llmx2.ll.mit.edu (llmx2.ll.mit.edu [129.55.12.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 97F6CF8023F for ; Sat, 21 Dec 2019 06:32:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 97F6CF8023F Received: from LLE2K16-MBX03.mitll.ad.local (LLE2K16-MBX03.mitll.ad.local) by llmx2.ll.mit.edu (unknown) with ESMTPS id xBL5WOis023816 for ; Sat, 21 Dec 2019 00:32:24 -0500 From: David Ward To: Date: Sat, 21 Dec 2019 00:32:06 -0500 Message-ID: <1576906331-5212-7-git-send-email-david.ward@ll.mit.edu> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> References: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-12-20_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912210045 Cc: David Ward Subject: [alsa-devel] [PATCH alsa-utils 06/11] alsa-info.sh: Replace gauge with infobox for upload dialog X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The gauge did not actually show the upload progress; in fact, the dialog did not even appear until after the upload was completed. Use an infobox instead, which will be displayed while wget runs. Signed-off-by: David Ward --- alsa-info/alsa-info.sh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh index 372d7ae..a02864d 100755 --- a/alsa-info/alsa-info.sh +++ b/alsa-info/alsa-info.sh @@ -830,19 +830,11 @@ if [[ -n $DIALOG ]] then if [[ -z $PASTEBIN ]]; then + dialog --backtitle "$BGTITLE" --infobox "Uploading information to www.alsa-project.org ..." 6 70 wget -O - --tries=5 --timeout=60 --post-file=$FILE "http://www.alsa-project.org/cardinfo-db/" &>$TEMPDIR/wget.tmp || echo "Upload failed; exit" - { for i in 10 20 30 40 50 60 70 80 90; do - echo $i - sleep 0.2 - done - echo; } |dialog --backtitle "$BGTITLE" --guage "Uploading information to www.alsa-project.org ..." 6 70 0 else + dialog --backtitle "$BGTITLE" --infobox "Uploading information to www.pastebin.ca ..." 6 70 wget -O - --tries=5 --timeout=60 --post-file=$FILE "http://pastebin.ca/quiet-paste.php?api=$PASTEBINKEY&encrypt=t&encryptpw=blahblah" &>$TEMPDIR/wget.tmp || echo "Upload failed; exit" - { for i in 10 20 30 40 50 60 70 80 90; do - echo $i - sleep 0.2 - done - echo; } |dialog --backtitle "$BGTITLE" --guage "Uploading information to www.pastebin.ca ..." 6 70 0 fi dialog --backtitle "$BGTITLE" --title "Information uploaded" --yesno "Would you like to see the uploaded information?" 5 100 From patchwork Sat Dec 21 05:32:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Ward X-Patchwork-Id: 11306801 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2B9AA921 for ; Sat, 21 Dec 2019 05:38:27 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B669021775 for ; Sat, 21 Dec 2019 05:38:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="sE/Pubd4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B669021775 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ll.mit.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EBAD8166B; Sat, 21 Dec 2019 06:37:34 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EBAD8166B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1576906705; bh=JRTja1A08DxZFpkBoBBd7QQlk5BE33RBndz8b1ESzC4=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=sE/Pubd4pndigRvk3BpkIvgicrTNoIzJbioxWrZh9y8whglxGdrguZhszrL4QtImM seiU+RyAsJ0humJIxY9onvuVTnRoJJ6pbs+kieSaIbh3g3ASmq0op5V88/R+6oZam2 +cWWOqh9ibBHVtr/OjaQ549yj+q62O/JxWwX/j2Q= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id F2E38F802A2; Sat, 21 Dec 2019 06:32:44 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 98B74F8026A; Sat, 21 Dec 2019 06:32:32 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, SURBL_BLOCKED,UNPARSEABLE_RELAY autolearn=disabled version=3.4.0 Received: from llmx3.ll.mit.edu (llmx3.ll.mit.edu [129.55.12.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5A71CF80234 for ; Sat, 21 Dec 2019 06:32:26 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5A71CF80234 Received: from LLE2K16-MBX03.mitll.ad.local (LLE2K16-MBX03.mitll.ad.local) by llmx3.ll.mit.edu (unknown) with ESMTPS id xBL5WPDF023223 for ; Sat, 21 Dec 2019 00:32:25 -0500 From: David Ward To: Date: Sat, 21 Dec 2019 00:32:07 -0500 Message-ID: <1576906331-5212-8-git-send-email-david.ward@ll.mit.edu> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> References: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-12-20_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912210045 Cc: David Ward Subject: [alsa-devel] [PATCH alsa-utils 07/11] alsa-info.sh: Remove progress spinner during upload without dialog X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The spinner did not actually provide information about the status of the file upload, and caused other problems: it would repeatedly spawn new pgrep processes (without a delay between them), and it blocked the script if any wget process was running on the system. Signed-off-by: David Ward --- alsa-info/alsa-info.sh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh index a02864d..9bc8c38 100755 --- a/alsa-info/alsa-info.sh +++ b/alsa-info/alsa-info.sh @@ -857,16 +857,7 @@ else wget -O - --tries=5 --timeout=60 --post-file=$FILE http://pastebin.ca/quiet-paste.php?api=$PASTEBINKEY &>$TEMPDIR/wget.tmp & fi -#Progess spinner for wget transfer. -i=1 -sp="/-\|" -echo -n ' ' -while pgrep wget &>/dev/null -do - echo -en "\b${sp:i++%${#sp}:1}" -done - -echo -e "\b Done!" +echo -e " Done!" echo "" fi # dialog From patchwork Sat Dec 21 05:32:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Ward X-Patchwork-Id: 11306803 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BF03D921 for ; Sat, 21 Dec 2019 05:39:24 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5518B21D7D for ; Sat, 21 Dec 2019 05:39:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="H0FdjE2T" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5518B21D7D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ll.mit.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4E5C81667; Sat, 21 Dec 2019 06:38:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4E5C81667 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1576906762; bh=S/Zv6ZjVd/YUnHgzksyOjUdz7vzaY6/95dpBIb4s5VY=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=H0FdjE2TEg2pyQZdPUcGWqtdEp2b3bcNGaRXk3908IN+tbvYgKXNvQVN5WmMx4v1D q4SvJEwuL9v3QSU0viyWdCZF6RDu4pCjQgjr75J5oJMopyC/qQrpPyGVYHytM5gvvz pRL7BRub9qEajZIDzaDR3rn/R8SgVCwNwENnG3Xc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3FCDDF802C4; Sat, 21 Dec 2019 06:32:46 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 20439F80268; Sat, 21 Dec 2019 06:32:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, SURBL_BLOCKED,UNPARSEABLE_RELAY autolearn=disabled version=3.4.0 Received: from llmx2.ll.mit.edu (llmx2.ll.mit.edu [129.55.12.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2523CF800BC for ; Sat, 21 Dec 2019 06:32:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2523CF800BC Received: from LLE2K16-MBX03.mitll.ad.local (LLE2K16-MBX03.mitll.ad.local) by llmx2.ll.mit.edu (unknown) with ESMTPS id xBL5WQ75023819 for ; Sat, 21 Dec 2019 00:32:26 -0500 From: David Ward To: Date: Sat, 21 Dec 2019 00:32:08 -0500 Message-ID: <1576906331-5212-9-git-send-email-david.ward@ll.mit.edu> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> References: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-12-20_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912210045 Cc: David Ward Subject: [alsa-devel] [PATCH alsa-utils 08/11] alsa-info.sh: Condense nested commands for file upload X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Signed-off-by: David Ward --- alsa-info/alsa-info.sh | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh index 9bc8c38..7560b0d 100755 --- a/alsa-info/alsa-info.sh +++ b/alsa-info/alsa-info.sh @@ -828,15 +828,19 @@ then if [[ -n $DIALOG ]] then + dialog --backtitle "$BGTITLE" --infobox "Uploading information to $WWWSERVICE ..." 6 70 +else + echo -n "Uploading information to $WWWSERVICE ..." +fi if [[ -z $PASTEBIN ]]; then - dialog --backtitle "$BGTITLE" --infobox "Uploading information to www.alsa-project.org ..." 6 70 wget -O - --tries=5 --timeout=60 --post-file=$FILE "http://www.alsa-project.org/cardinfo-db/" &>$TEMPDIR/wget.tmp || echo "Upload failed; exit" else - dialog --backtitle "$BGTITLE" --infobox "Uploading information to www.pastebin.ca ..." 6 70 wget -O - --tries=5 --timeout=60 --post-file=$FILE "http://pastebin.ca/quiet-paste.php?api=$PASTEBINKEY&encrypt=t&encryptpw=blahblah" &>$TEMPDIR/wget.tmp || echo "Upload failed; exit" fi +if [ -n "$DIALOG" ]; then + dialog --backtitle "$BGTITLE" --title "Information uploaded" --yesno "Would you like to see the uploaded information?" 5 100 DIALOG_EXIT_CODE=$? if [ $DIALOG_EXIT_CODE = 0 ]; then @@ -849,14 +853,6 @@ clear # no dialog else -if [[ -z $PASTEBIN ]]; then - echo -n "Uploading information to www.alsa-project.org ... " - wget -O - --tries=5 --timeout=60 --post-file=$FILE http://www.alsa-project.org/cardinfo-db/ &>$TEMPDIR/wget.tmp & -else - echo -n "Uploading information to www.pastebin.ca ... " - wget -O - --tries=5 --timeout=60 --post-file=$FILE http://pastebin.ca/quiet-paste.php?api=$PASTEBINKEY &>$TEMPDIR/wget.tmp & -fi - echo -e " Done!" echo "" From patchwork Sat Dec 21 05:32:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Ward X-Patchwork-Id: 11306805 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EE40A921 for ; Sat, 21 Dec 2019 05:39:39 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 75A24206D3 for ; Sat, 21 Dec 2019 05:39:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="s2zh6ZJe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 75A24206D3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ll.mit.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B0A071675; Sat, 21 Dec 2019 06:38:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B0A071675 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1576906777; bh=2hxlwxfEg/yPx/NbWLOxP9GVZhCN0zGTWuJByAWA0bk=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=s2zh6ZJehMsSMN85tKTI9WCHdm8TBRp+jE4xD6pKSmowMY3cc0umclYD6XETg8n6Y XtkbEygeAn3keNsHuBNKY/76Np7t867F5FCLZqhsUYl47/aM9X81MKlvqV+lGrOqSG fXhWP8YigKOBjOUDSaMwPGC6iGSiEXHJ/aOtdve0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5E3A8F802D2; Sat, 21 Dec 2019 06:32:47 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 427A4F80268; Sat, 21 Dec 2019 06:32:34 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, SURBL_BLOCKED,UNPARSEABLE_RELAY autolearn=disabled version=3.4.0 Received: from llmx3.ll.mit.edu (llmx3.ll.mit.edu [129.55.12.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4B0E8F80266 for ; Sat, 21 Dec 2019 06:32:29 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4B0E8F80266 Received: from LLE2K16-MBX03.mitll.ad.local (LLE2K16-MBX03.mitll.ad.local) by llmx3.ll.mit.edu (unknown) with ESMTPS id xBL5WSPQ023226 for ; Sat, 21 Dec 2019 00:32:28 -0500 From: David Ward To: Date: Sat, 21 Dec 2019 00:32:09 -0500 Message-ID: <1576906331-5212-10-git-send-email-david.ward@ll.mit.edu> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> References: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-12-20_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912210045 Cc: David Ward Subject: [alsa-devel] [PATCH alsa-utils 09/11] alsa-info.sh: Condense nested commands for formatting upload result X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Signed-off-by: David Ward --- alsa-info/alsa-info.sh | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh index 7560b0d..8b4745b 100755 --- a/alsa-info/alsa-info.sh +++ b/alsa-info/alsa-info.sh @@ -858,19 +858,15 @@ echo "" fi # dialog -# See if tput is available, and use it if it is. -if [ -n "$TPUT" ]; then - if [[ -z $PASTEBIN ]]; then - FINAL_URL=$(tput setaf 1; grep "SUCCESS:" $TEMPDIR/wget.tmp | cut -d ' ' -f 2 ; tput sgr0) - else - FINAL_URL=$(tput setaf 1; grep "SUCCESS:" $TEMPDIR/wget.tmp | sed -n 's/.*\:\([0-9]\+\).*/http:\/\/pastebin.ca\/\1/p'; tput sgr0) - fi +if [ -z "$PASTEBIN" ]; then + FINAL_URL=$(grep "SUCCESS:" $TEMPDIR/wget.tmp | cut -d ' ' -f 2) else - if [[ -z $PASTEBIN ]]; then - FINAL_URL=$(grep "SUCCESS:" $TEMPDIR/wget.tmp | cut -d ' ' -f 2) - else - FINAL_URL=$(grep "SUCCESS:" $TEMPDIR/wget.tmp | sed -n 's/.*\:\([0-9]\+\).*/http:\/\/pastebin.ca\/\1/p') - fi + FINAL_URL=$(grep "SUCCESS:" $TEMPDIR/wget.tmp | sed -n 's/.*\:\([0-9]\+\).*/http:\/\/pastebin.ca\/\1/p') +fi + +# See if tput is available, and use it if it is. +if [ -x "$TPUT" ]; then + FINAL_URL=$(tput setaf 1; printf '%s' "$FINAL_URL"; tput sgr0) fi # Output the URL of the uploaded file. From patchwork Sat Dec 21 05:32:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Ward X-Patchwork-Id: 11306807 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 29907109A for ; Sat, 21 Dec 2019 05:40:15 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AA2C321775 for ; Sat, 21 Dec 2019 05:40:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="HTUgw0fP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA2C321775 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ll.mit.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D0D591674; Sat, 21 Dec 2019 06:39:22 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D0D591674 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1576906812; bh=E9Kb2B3PoFbFuuZ1/+rt47r0XCd+xkX/ABKSPmrLzYQ=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=HTUgw0fPM8Fyl4sxEYEOhDX8a9CP/bQUKFPJoLxfOn+IRbGFMh587BJwl6v8rM+4k mDGMtde3/CT0ECyRcLbdNj/k+14Mq1sFPL57EAm2LkyZZwCmMmArp3Bq40IrdCdy4P aWON3VRfOepeb9uknUxaT9GUF2gI/9A/aQ7skPwU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7CC0EF802E7; Sat, 21 Dec 2019 06:32:48 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id C8B8BF80277; Sat, 21 Dec 2019 06:32:36 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, SURBL_BLOCKED,UNPARSEABLE_RELAY autolearn=disabled version=3.4.0 Received: from llmx2.ll.mit.edu (llmx2.ll.mit.edu [129.55.12.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A31CDF8023F for ; Sat, 21 Dec 2019 06:32:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A31CDF8023F Received: from LLE2K16-MBX03.mitll.ad.local (LLE2K16-MBX03.mitll.ad.local) by llmx2.ll.mit.edu (unknown) with ESMTPS id xBL5WVJu023823 for ; Sat, 21 Dec 2019 00:32:31 -0500 From: David Ward To: Date: Sat, 21 Dec 2019 00:32:10 -0500 Message-ID: <1576906331-5212-11-git-send-email-david.ward@ll.mit.edu> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> References: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-12-20_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912210045 Cc: David Ward Subject: [alsa-devel] [PATCH alsa-utils 10/11] alsa-info.sh: Perform test for wget earlier X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" If wget is not present, do not ask about uploading the information. Signed-off-by: David Ward --- alsa-info/alsa-info.sh | 73 ++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 38 deletions(-) diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh index 8b4745b..399d662 100755 --- a/alsa-info/alsa-info.sh +++ b/alsa-info/alsa-info.sh @@ -769,6 +769,41 @@ if [ -z "$WITHALL" ]; then withall fi +# Check if wget is installed, and supports --post-file. +if ! wget --help 2>/dev/null | grep -q post-file; then + # We couldn't find a suitable wget. If --upload was passed, tell the user to upload manually. + if [ "$UPLOAD" != "yes" ]; then + : + elif [ -n "$DIALOG" ]; then + if [ -z "$PASTEBIN" ]; then + dialog --backtitle "$BGTITLE" --msgbox "Could not automatically upload output to http://www.alsa-project.org.\nPossible reasons are:\n\n 1. Couldn't find 'wget' in your PATH\n 2. Your version of wget is less than 1.8.2\n\nPlease manually upload $NFILE to http://www.alsa-project.org/cardinfo-db/ and submit your post." 25 100 + else + dialog --backtitle "$BGTITLE" --msgbox "Could not automatically upload output to http://www.pastebin.ca.\nPossible reasons are:\n\n 1. Couldn't find 'wget' in your PATH\n 2. Your version of wget is less than 1.8.2\n\nPlease manually upload $NFILE to http://www.pastebin.ca/upload.php and submit your post." 25 100 + fi + else + if [ -z "$PASTEBIN" ]; then + echo "" + echo "Could not automatically upload output to http://www.alsa-project.org" + echo "Possible reasons are:" + echo " 1. Couldn't find 'wget' in your PATH" + echo " 2. Your version of wget is less than 1.8.2" + echo "" + echo "Please manually upload $NFILE to http://www.alsa-project.org/cardinfo-db/ and submit your post." + echo "" + else + echo "" + echo "Could not automatically upload output to http://www.pastebin.ca" + echo "Possible reasons are:" + echo " 1. Couldn't find 'wget' in your PATH" + echo " 2. Your version of wget is less than 1.8.2" + echo "" + echo "Please manually upload $NFILE to http://www.pastebin.ca/upload.php and submit your post." + echo "" + fi + fi + UPLOAD="no" +fi + if [ "$UPLOAD" = "ask" ]; then if [ -n "$DIALOG" ]; then dialog --backtitle "$BGTITLE" --title "Information collected" --yes-label " UPLOAD / SHARE " --no-label " SAVE LOCALLY " --defaultno --yesno "\n\nAutomatically upload ALSA information to $WWWSERVICE?" 10 80 @@ -822,10 +857,6 @@ if [ "$UPLOAD" = "no" ]; then fi # UPLOAD -# Test that wget is installed, and supports --post-file. Upload $FILE if it does, and prompt user to upload file if it does not. -if [[ -n "${WGET}" ]] && [[ -x "${WGET}" ]] && [[ $(wget --help | grep post-file) ]] -then - if [[ -n $DIALOG ]] then dialog --backtitle "$BGTITLE" --infobox "Uploading information to $WWWSERVICE ..." 6 70 @@ -873,37 +904,3 @@ fi echo "Your ALSA information is located at $FINAL_URL" echo "Please inform the person helping you." echo "" - -# We couldnt find a suitable wget, so tell the user to upload manually. -else - mv -f $FILE $NFILE || exit 1 - KEEP_OUTPUT="yes" - if [[ -z $DIALOG ]] - then - if [[ -z $PASTEBIN ]]; then - echo "" - echo "Could not automatically upload output to http://www.alsa-project.org" - echo "Possible reasons are:" - echo " 1. Couldnt find 'wget' in your PATH" - echo " 2. Your version of wget is less than 1.8.2" - echo "" - echo "Please manually upload $NFILE to http://www.alsa-project.org/cardinfo-db/ and submit your post." - echo "" - else - echo "" - echo "Could not automatically upload output to http://www.pastebin.ca" - echo "Possible reasons are:" - echo " 1. Couldnt find 'wget' in your PATH" - echo " 2. Your version of wget is less than 1.8.2" - echo "" - echo "Please manually upload $NFILE to http://www.pastebin.ca/upload.php and submit your post." - echo "" - fi - else - if [[ -z $PASTEBIN ]]; then - dialog --backtitle "$BGTITLE" --msgbox "Could not automatically upload output to http://www.alsa-project.org.\nPossible reasons are:\n\n 1. Couldn't find 'wget' in your PATH\n 2. Your version of wget is less than 1.8.2\n\nPlease manually upload $NFILE to http://www.alsa-project,org/cardinfo-db/ and submit your post." 25 100 - else - dialog --backtitle "$BGTITLE" --msgbox "Could not automatically upload output to http://www.pastebin.ca.\nPossible reasons are:\n\n 1. Couldn't find 'wget' in your PATH\n 2. Your version of wget is less than 1.8.2\n\nPlease manually upload $NFILE to http://www.pastebin.ca/upload.php and submit your post." 25 100 - fi - fi -fi From patchwork Sat Dec 21 05:32:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Ward X-Patchwork-Id: 11306809 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BD05A921 for ; Sat, 21 Dec 2019 05:41:03 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 52D3821D7D for ; Sat, 21 Dec 2019 05:41:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="JpMHePdf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52D3821D7D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ll.mit.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9D0F6886; Sat, 21 Dec 2019 06:40:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9D0F6886 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1576906861; bh=5Ebp4ldTfGOQP64kkh32zaiK32+CNGoOtxBC8mzmf7E=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=JpMHePdfWK+pZ+kMnm81L0YoWAL52aaKK8bl7Hvv+Edoo6iwe+W21+OoeB4ZoEgWm 65YZh4IdLyEMO2ZON/0MzyMDhehsAUja+sAxKORXXt4bwAfjQeWArV+rZBYIOc5Kwi rgrdxFrlMEodsbYi6HP1anAaoq+rSdqLkEXEN7Nw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D5A1DF802EC; Sat, 21 Dec 2019 06:32:49 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 885C6F8027B; Sat, 21 Dec 2019 06:32:38 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, SURBL_BLOCKED,UNPARSEABLE_RELAY autolearn=disabled version=3.4.0 Received: from llmx3.ll.mit.edu (llmx3.ll.mit.edu [129.55.12.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 022BAF8026A for ; Sat, 21 Dec 2019 06:32:33 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 022BAF8026A Received: from LLE2K16-MBX03.mitll.ad.local (LLE2K16-MBX03.mitll.ad.local) by llmx3.ll.mit.edu (unknown) with ESMTPS id xBL5WWOn023246 for ; Sat, 21 Dec 2019 00:32:32 -0500 From: David Ward To: Date: Sat, 21 Dec 2019 00:32:11 -0500 Message-ID: <1576906331-5212-12-git-send-email-david.ward@ll.mit.edu> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> References: <1576906331-5212-1-git-send-email-david.ward@ll.mit.edu> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-12-20_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912210045 Cc: David Ward Subject: [alsa-devel] [PATCH alsa-utils 11/11] alsa-info.sh: Warn after actual upload failure; do not ping server X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Check the return value of wget to determine if the upload actually failed. If so, display the message about upload failure, then exit. Do not ping the web server; the result does not indicate whether a file upload will succeed or not. Signed-off-by: David Ward --- alsa-info/alsa-info.sh | 58 ++++++++++++++++++++++---------------------------- 1 file changed, 25 insertions(+), 33 deletions(-) diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh index 399d662..7bae30a 100755 --- a/alsa-info/alsa-info.sh +++ b/alsa-info/alsa-info.sh @@ -35,22 +35,12 @@ BGTITLE="ALSA-Info v $SCRIPT_VERSION" PASTEBINKEY="C9cRIO8m/9y8Cs0nVs0FraRx7U0pHsuc" WGET=$(which wget 2>/dev/null | sed 's|^[^/]*||' 2>/dev/null) -REQUIRES="mktemp grep pgrep whereis ping awk date uname cat sort dmesg amixer alsactl" +REQUIRES="mktemp grep pgrep whereis awk date uname cat sort dmesg amixer alsactl" # # Define some simple functions # -pbcheck() { - [[ $UPLOAD = "no" ]] && return - - if [[ -z $PASTEBIN ]]; then - [[ $(ping -c1 www.alsa-project.org) ]] || KEEP_FILES="yes" UPLOAD="no" PBERROR="yes" - else - [[ $(ping -c1 www.pastebin.ca) ]] || KEEP_FILES="yes" UPLOAD="no" PBERROR="yes" - fi -} - update() { test -z "$WGET" -o ! -x "$WGET" && return @@ -650,7 +640,6 @@ fi #If no command line options are specified, then run as though --with-all was specified if [ -z "$1" ]; then update - pbcheck fi fi # proceed @@ -662,7 +651,6 @@ if [ -n "$1" ]; then case "$1" in --pastebin) update - pbcheck ;; --update) update @@ -832,25 +820,11 @@ if [ "$UPLOAD" = "no" ]; then if [[ -n $DIALOG ]] then - if [[ -n $PBERROR ]]; then - dialog --backtitle "$BGTITLE" --title "Information collected" --msgbox "An error occurred while contacting the $WWWSERVICE.\n Your information was NOT automatically uploaded.\n\nYour ALSA information is in $NFILE" 10 100 - else - dialog --backtitle "$BGTITLE" --title "Information collected" --msgbox "\n\nYour ALSA information is in $NFILE" 10 60 - fi + dialog --backtitle "$BGTITLE" --title "Information collected" --msgbox "\n\nYour ALSA information is in $NFILE" 10 60 else - echo - - if [[ -n $PBERROR ]]; then - echo "An error occurred while contacting the $WWWSERVICE." - echo "Your information was NOT automatically uploaded." - echo "" - echo "Your ALSA information is in $NFILE" - echo "" - else - echo "" - echo "Your ALSA information is in $NFILE" - echo "" - fi + echo "" + echo "Your ALSA information is in $NFILE" + echo "" fi exit @@ -865,9 +839,27 @@ else fi if [[ -z $PASTEBIN ]]; then - wget -O - --tries=5 --timeout=60 --post-file=$FILE "http://www.alsa-project.org/cardinfo-db/" &>$TEMPDIR/wget.tmp || echo "Upload failed; exit" + wget -O - --tries=5 --timeout=60 --post-file=$FILE "http://www.alsa-project.org/cardinfo-db/" &>$TEMPDIR/wget.tmp else - wget -O - --tries=5 --timeout=60 --post-file=$FILE "http://pastebin.ca/quiet-paste.php?api=$PASTEBINKEY&encrypt=t&encryptpw=blahblah" &>$TEMPDIR/wget.tmp || echo "Upload failed; exit" + wget -O - --tries=5 --timeout=60 --post-file=$FILE "http://pastebin.ca/quiet-paste.php?api=$PASTEBINKEY&encrypt=t&encryptpw=blahblah" &>$TEMPDIR/wget.tmp +fi + +if [ $? -ne 0 ]; then + mv -f $FILE $NFILE || exit 1 + KEEP_OUTPUT="yes" + + if [ -n "$DIALOG" ]; then + dialog --backtitle "$BGTITLE" --title "Information not uploaded" --msgbox "An error occurred while contacting $WWWSERVICE.\n Your information was NOT automatically uploaded.\n\nYour ALSA information is in $NFILE" 10 100 + else + echo "" + echo "An error occurred while contacting $WWWSERVICE." + echo "Your information was NOT automatically uploaded." + echo "" + echo "Your ALSA information is in $NFILE" + echo "" + fi + + exit fi if [ -n "$DIALOG" ]; then