Date: Fri, 31 Mar 2017 06:27:10 -0400 From: Stari Karp <starikarp@yandex.com> To: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: sndio Message-ID: <1490956030.21333.2.camel@yandex.com>
next in thread | raw e-mail | index | archive | help
Hi! I am using Synth for ports and I got a problem with port sndio. I thoughtpkg is a problem but I am not sure. Thank you. Installing sndio-1.2.0_2... ===> Creating groups. Using existing group '_sndio'. ===> Creating users Creating user '_sndio' with uid '702'. pw: user '_sndio' disappeared during update pkg: PRE-INSTALL script failed Unfortunately, the system upgraded failed. From owner-freebsd-questions@freebsd.org Fri Mar 31 12:37:08 2017 Return-Path: <owner-freebsd-questions@freebsd.org> Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5E7BD23B3E for <freebsd-questions@mailman.ysv.freebsd.org>; Fri, 31 Mar 2017 12:37:08 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-wr0-x22d.google.com (mail-wr0-x22d.google.com [IPv6:2a00:1450:400c:c0c::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 439FF797 for <freebsd-questions@freebsd.org>; Fri, 31 Mar 2017 12:37:08 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: by mail-wr0-x22d.google.com with SMTP id k6so98945892wre.2 for <freebsd-questions@freebsd.org>; Fri, 31 Mar 2017 05:37:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=bdYLSIpZoIYBVrN8+RD2Pa6vldLOpFHy69E+qBJ6q1o=; b=nea6uIoqbXxNZW6tq2E+ZJOzp5kmaoT6eqSizSE1IaxP4PfetsDHfJF/iIxJv0uuEc TSEtubRpHXywB6+bxABMUXCcgSk/d6UCq2XznUsMYwY8/7hVE13TFVNEpA1hBraBuHw0 +N2HqZ4etzeN3b2CDZZnN0V4GscnkITMZKaykYYcEeV1cgMNqbzTn45UV5FDckC3HitN iUL2dVuMNkYUzUAv+h5S9ZA8Lgc7/2chDw/KtQZBhyCYjVcEzbOyOUvR01qNtXGG4zDi 9nFfJLySJp5aWS7JhvXjZ+3p08iqXiFp39FPyfMZgK8Wr33b4MBuKyIxC07+uQxUSZcS pKLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bdYLSIpZoIYBVrN8+RD2Pa6vldLOpFHy69E+qBJ6q1o=; b=VQu6N1QodyzgOA8sLRKw5YHPntV/9Vr871E5LxahHd3BGV0W87GguC3dY3TOrgErHV UDt3OUR4IZh6hL3BNT1I1VSSi861yLeIh/v564cYG02UJ7ySkTiDt71LrIFgDH2+hCwg pj9BI3+g0c5B+FxCmHxQUTgpmfyoO1Xesyv9w0I7PMuEO4yi0Onj0+hOS/McmKu9P8ON Ght0BbwOh4wwS8SJmFjKv1iCbqKWMsISrwZW4hsKNmdlVbhftJv5cG0ah8IoAVfmPRw2 +fFVUr5dMTDXAWvq5uFk/GooXyvQIN6p/FOygyNQEHv575vYFttMsSr7DcRsVYCX+4fa EV9g== X-Gm-Message-State: AFeK/H3A2M3JfV1ITrMTFm2LNqBTFQid+x/dBcdyTGIv2XXI2ldBelIxGoQWWb43+fJC0g== X-Received: by 10.28.135.21 with SMTP id j21mr2571349wmd.70.1490963826369; Fri, 31 Mar 2017 05:37:06 -0700 (PDT) Received: from gumby.homeunix.com ([81.17.24.158]) by smtp.gmail.com with ESMTPSA id y65sm6568937wrb.50.2017.03.31.05.37.05 for <freebsd-questions@freebsd.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 31 Mar 2017 05:37:05 -0700 (PDT) Date: Fri, 31 Mar 2017 13:37:03 +0100 From: RW <rwmaillists@googlemail.com> To: freebsd-questions@freebsd.org Subject: Re: shell script guru Message-ID: <20170331133703.4c172c6d@gumby.homeunix.com> In-Reply-To: <CAPORhP73=2_5nfOaR=a=TZTOyquBSZRS===FakeJWMPLjpNMjw@mail.gmail.com> References: <CAPORhP5ESqJL+kK4tfSD5t5=fnFjsCNXGdUhAjMpezq4WdjKyw@mail.gmail.com> <CADbyKk61wyYj1Jgc9daFTbXE_9s5xPLEYHa4p=KF8FhngzOQ3Q@mail.gmail.com> <CAPORhP6+u4DpUq=9WJ9XmSHDYSJSmXaa6_o7NnVtOq=n_g0v=w@mail.gmail.com> <CAFsnNZL8EgYQK9u_mz4BB+ULwo9xgsPFT+P-4uD4-tqHd+n2QQ@mail.gmail.com> <CANJ8om6svf+6sgrV4UW8F=aidaHhWce+fNO4-g4Lfa2QteYa7w@mail.gmail.com> <CAPORhP73=2_5nfOaR=a=TZTOyquBSZRS===FakeJWMPLjpNMjw@mail.gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.29; amd64-portbld-freebsd10.3) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions <freebsd-questions.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/> List-Post: <mailto:freebsd-questions@freebsd.org> List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 31 Mar 2017 12:37:08 -0000 On Thu, 30 Mar 2017 23:56:08 -0400 David Mehler wrote: > Here's the script that I put in monthly: > > #!/bin/sh > # > # Monthly retrieve the selected country IP block lists > # Retrieves dns zones from ipdeny.com > # Adds the zones to a country block file > # Then adds them to a pf block table > > # If there is a global system configuration file, suck it in. > # > if [ -r /etc/defaults/periodic.conf ] > then > . /etc/defaults/periodic.conf > source_periodic_confs > fi > > case "$monthly_country_blocks_enable" in > [Yy][Ee][Ss]) > cd /tmp As a general rule you should use mktemp, there's less to go wrong and it's more secure. > echo "Retrieving Zones" > for i in "af" "al" "dz" "am" "az" "ba" "br" "kh" "cf" "cn" "co" "cr" > "hr" "cu" "cy" "cz" "do" "eg" "fr" "gi" "ht" "ir" "iq" "jp" "jo" "kz" > "kp" "kr" "kw" "lb" "li" "ni" "ne" "ng" "om" "pk" "qa" "ro" "ru" "sa" > "rs" "so" "za" "sy" "tj" "tr" "tm" "ae" "uz" "vn" "ye" ; > do > wget -4 --no-proxy --no-cookies --no-cache > --append-output=/var/log/wget.log > http://ipdeny.com/ipblocks/data/countries/$i.zone IIWY I'd cd to a directory where the files can be stored persistently, so if the something goes wrong you can keep the last good copy of each file. fetch "$serverdir/$i.zone" && mv $i.zone $i.ips then after the loop: cat *.ips > blocked_countries mv blocked_countries /etc/pf/ For anything that's BSD specific it's better to use fetch if you can. If you use wget you should check that it's installed at runtime. > cat $i.zone >>/tmp/blocked_countries Note that this will create blocked_countries even if $i.zone doesn't exist, so your script would install a completely empty file over a working file if the server/network is down or wget is missing.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1490956030.21333.2.camel>