Menu

#10 error: quotes in "network" script

closed-rejected
nobody
bug fixes (18)
5
2001-02-03
2001-01-28
No

With 3 different network cards I got errors while using ``dhclient''. Errors included ``[modprobe] can't locate module 2>&1'' and ``[dhclient] >/dev/null no such interface''.

There are a couple of instances where the ``log'' function was called with quotes behind it. If you look at ``log'' in the ``shared'' script, you'll notice that commands get run with ``echo "$*" ; eval $*''. That means the command line is passed unchanged.

This means "log" should get called without quotes.

The diff -u is below, but you might want to ``patch'' the thing with an even easier:

sed 's/log "\(.*\)"/log \1/' network.orig > network

The errors are gone now.

Discussion

  • Valentijn Sessink

    None

     
  • David Hinds

    David Hinds - 2001-01-29

    The quotes are there for a very specific reason and are not there by accident. The "eval" in the log function in 3.1.24 is there specifically to remove the quotes. This all does appear to work for me, both with an old bash and with a new bash-2, so there is something unusual about your setup. What is your /bin/sh?

    You may not be getting these errors, but having the redirections evaluated in the network script rather than in the log function should break the scripts in less obvious ways.

    -- Dave

     
  • Valentijn Sessink

    Dave, I was being stupid. Mea culpa.

    My system is a regular Debian Potato with Bash as /bin/sh. The problem was that my ``shared'' script was an older version (yes really, it was that stupid). So: yes, the ``eval'' function does work as it should, and no, the patch is not needed.

    (my patch can be deleted now, I guess ;)

     
  • David Hinds

    David Hinds - 2001-02-03
    • status: open-rejected --> closed-rejected
     

Log in to post a comment.