Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Issue 3432020: postinst: don't abort after marking new part bootable. (Closed)

Created:
10 years, 3 months ago by adlr
Modified:
9 years ago
CC:
chromium-os-reviews_chromium.org
Base URL:
ssh://git@chromiumos-git/installer.git
Visibility:
Public.

Description

postinst: don't abort after marking new part bootable. Also, remove &>, which doesn't work in our /bin/sh. The replacement is 2>&1 > This has the side-effect of working around firmware updates that fail causing update to fail (which is a spectacularly bad failure mode as it can lead to bricked machines). BUG=6947, 6948 TEST=Tested install w/ intentionally borked postinst Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=36a47da

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -3 lines) Patch
M chromeos-postinst View 2 chunks +6 lines, -1 line 0 comments Download
M chromeos-setimage View 1 chunk +2 lines, -2 lines 1 comment Download

Messages

Total messages: 7 (0 generated)
adlr
10 years, 3 months ago (2010-09-23 00:12:24 UTC) #1
Will Drewry
LGTM thanks! http://codereview.chromium.org/3432020/diff/1/3 File chromeos-setimage (right): http://codereview.chromium.org/3432020/diff/1/3#newcode39 chromeos-setimage:39: if type rootdev 2>&1 > /dev/null; then ...
10 years, 3 months ago (2010-09-23 01:57:35 UTC) #2
adlr
On Wed, Sep 22, 2010 at 6:57 PM, <wad@chromium.org> wrote: > LGTM > > thanks! ...
10 years, 3 months ago (2010-09-23 17:11:52 UTC) #3
Kenneth Waters
Umm, "2>&1 >/dev/null", redirects stderr to stdout, and silences stdout. I'm almost positive you want, ...
10 years, 3 months ago (2010-09-23 18:44:11 UTC) #4
adlr
Thats good to know, and I'll send a fix. Is there a doc somewhere that ...
10 years, 3 months ago (2010-09-23 21:36:54 UTC) #5
adlr
[-chromium-os-reviews] Oh, I think I get it: if you do 2>&1 >somewhere first, we dup ...
10 years, 3 months ago (2010-09-23 21:45:19 UTC) #6
Kenneth Waters
10 years, 3 months ago (2010-09-23 22:09:41 UTC) #7
On Thu, Sep 23, 2010 at 2:44 PM, Andrew de los Reyes <adlr@chromium.org>wrote:

> [-chromium-os-reviews]
>
> Oh, I think I get it: if you do 2>&1 >somewhere
>
> first, we dup fd1 (the existing stdout) to fd2, then point fd1 to a new
> output.
>
> We want to direct fd1 to a new output, then dup that to fd2
>

Yes that's exactly it.  Also from the bash man page,

There are two formats for  redirecting  standard  output  and  standard
       error:

              &>word
       and
              >&word

       Of the two forms, the first is preferred.  This is semantically
equiva‐
       lent to

              >word 2>&1

-- Kenneth Waters

Powered by Google App Engine
This is Rietveld 408576698