Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 1140 - Bad redirection syntax in baselayout-1.7.4-r2
Summary: Bad redirection syntax in baselayout-1.7.4-r2
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Daniel Robbins (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-14 01:21 UTC by Arcady Genkin (RETIRED)
Modified: 2003-02-04 19:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arcady Genkin (RETIRED) gentoo-dev 2002-03-14 01:21:47 UTC
At least the following scripts in /etc/init.d:
  bootmisc
  halt.sh 
  localmount 
  modules 
  numlock 
  rmnologin 
  urandom
contain shell scripting expression "&> /dev/null".  It may be, of course, that
the intention is, indeed, to put the commands into background, but my gut
feeling is that the intended meaning is to send all output to /dev/null, in
which case, the occurences of "&>" should be replaced with ">/dev/null 2>&1", of
course.

The occurences of those "&>" are numerous.
Comment 1 Lars S. Jensen 2002-03-14 04:01:03 UTC
I think that it use bash via /etc/init.d/runscript.sh:

From bash:
There are two formats for redirecting standard output and standard error:
              &>word
       and
              >&word
Of  the two forms, the first is preferred.  This is seman
Comment 2 Lars S. Jensen 2002-03-14 04:01:03 UTC
I think that it use bash via /etc/init.d/runscript.sh:

From bash:
There are two formats for redirecting standard output and standard error:
              &>word
       and
              >&word
Of  the two forms, the first is preferred.  This is seman­tically equivalent to
              >word 2>&1

Comment 3 Arcady Genkin (RETIRED) gentoo-dev 2002-03-14 09:49:18 UTC
Looks like you are right.  I was not aware of this (yet another) incompatibility
of Bash with Bourne shell.  

[off topic]  Sadly, under vanilla Bourne shell this would not even cause a
sysntax error, but would result in a semantically different behaviour.

Closing this as invalid.