diff options
author | suigin <suigin@national.shitposting.agency> | 2016-09-03 15:17:50 -0700 |
---|---|---|
committer | suigin <suigin@national.shitposting.agency> | 2016-09-03 15:17:50 -0700 |
commit | d8105d33b0676f0d4918589207b7a893279d7b9f (patch) | |
tree | fcd2cc02536be8dbaca1b6c0675797de0cdbbb9f /crypt.awk | |
parent | 5a920a4d15bbd6cae640205e545a4f4b0aa81ab7 (diff) | |
download | runit-void-d8105d33b0676f0d4918589207b7a893279d7b9f.tar.gz runit-void-d8105d33b0676f0d4918589207b7a893279d7b9f.tar.xz runit-void-d8105d33b0676f0d4918589207b7a893279d7b9f.zip |
Make crypt.awk work with other awk(1) variants.
Change use of the coprocess pipe operator, a GNU extension, to a regular pipe when reading data back from blkid(8). Since we aren't piping data to blkid(8) and then reading it back, we only need a regular pipe and getline here anyway. Without this change, using mawk(1) as the default awk on Void results in failure when parsing /etc/crypttab and dumps us to a rescue shell on boot.
Diffstat (limited to 'crypt.awk')
-rw-r--r-- | crypt.awk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypt.awk b/crypt.awk index d533ab8..f025324 100644 --- a/crypt.awk +++ b/crypt.awk @@ -3,7 +3,7 @@ NF>4 { print "a valid crypttab has max 4 cols not " NF >"/dev/stderr"; next } { # decode the src variants split($2, o_src, "=") - if (o_src[1] == "UUID") "blkid -t " $2 " -l -o device" |& getline src; + if (o_src[1] == "UUID") "blkid -t " $2 " -l -o device" | getline src; else src=o_src[1]; # no password or none is given, ask fo it |