From owner-freebsd-current@FreeBSD.ORG Tue Jan 13 23:29:16 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28D00F36 for ; Tue, 13 Jan 2015 23:29:16 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0886ED39 for ; Tue, 13 Jan 2015 23:29:16 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DNTFYT042646 for ; Tue, 13 Jan 2015 23:29:15 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t0DNTFIh042645 for freebsd-current@freebsd.org; Tue, 13 Jan 2015 23:29:15 GMT (envelope-from bdrewery) Received: (qmail 14036 invoked from network); 13 Jan 2015 17:29:13 -0600 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 13 Jan 2015 17:29:13 -0600 Message-ID: <54B5AA4C.7050307@FreeBSD.org> Date: Tue, 13 Jan 2015 17:29:16 -0600 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Craig Rodrigues , freebsd-current Current Subject: Re: Devops question: freebsd-update needs a real tty to run, problem for automation References: In-Reply-To: OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hs0FIiMpUkuQ2RG7ECI5t8q70qAVdTxE0" Cc: Ahmed Kamal X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 23:29:16 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hs0FIiMpUkuQ2RG7ECI5t8q70qAVdTxE0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 1/13/2015 5:11 PM, Craig Rodrigues wrote: > Hi, >=20 > Ahmed Kamal, a devops expert, is helping me to script the steps to > upgrade a cluster of FreeBSD machines. For certain machines, > we want to track the official FreeBSD releases and use freebsd-update > to install official updates. >=20 > We found that when the invocation of freebsd-update was scripted > and not run via a real tty, we can into this error: >=20 > "freebsd-update fetch should not be run non-interactively." >=20 > There are various workarounds mentioned on various web pages. > However, should we modify freebsd-update so that it can work better > when not run via a real tty? This would make it more devops/automation= > friendly. >=20 > The closest thing I have found is "freebsd-update cron", which can fetc= h > the updates and run without a real tty. The only problem with > "freebsd-update cron" > is that it sleeps a random amount of time between 1 and 3600 seconds be= fore > fetching the updates. This is OK when run in a cron job, > but not OK when run as part of a devops automation framework. >=20 > Anybody have ideas as to the best way to proceed in fixing this in > freebsd-update? > -- > Craig sed -i '' -e 's,-t 0 ];,-t 0 ] \&\& [ 0 -eq 1 ],' /usr/sbin/freebsd-updat= e This is untested. We'll likely put it in Poudriere as well. IMHO the check should be removed in the official version. --=20 Regards, Bryan Drewery --hs0FIiMpUkuQ2RG7ECI5t8q70qAVdTxE0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJUtapMAAoJEDXXcbtuRpfP6CsH/AxX0kNQJTcm09+gHBw8tNxi L2SwgqF1LLDpcmJJXqVnnARu719BRpprV6Dhu+i+WOsXv9WQTVVapwMpPuP3d9/v HJj4AYauo4KyfGFVemcWdgs8BC0+g5DdDUga9CxWIdas2zqr86GF8osZoO3tPiNH hasA2wkA+foqPY98hLNOAPzp1wVp8ewr6mq+K1wCA0Nihsg5P1ZAIN1jZ6yYCfv3 ASXDnipWCfuf8Y+10uizcCAv8LHirLK095wd0b48VtzDyxDckwuB3jfvfS9VP5nx ehIAJ0NoaoyTEieTjrKSwG1qFJ29pJLkTTSqr5gpvpwy5QzC4o4NFCcG4tz6HF8= =QQrZ -----END PGP SIGNATURE----- --hs0FIiMpUkuQ2RG7ECI5t8q70qAVdTxE0--