Re: setterm syntax changed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2014-06-25 15:02 (GMT+0100) Richard W.M. Jones composed:

On Wed, Jun 25, 2014 at 12:06:10AM -0400, Felix Miata wrote:

Was there good reason to change it? For well over a decade across
all distros I've used, I've included this line in root's .bashrc,
always:

	setterm -foreground white -bold -background blue -blank 59 -store

The current man page has changed to require "--" where "-" was
sufficient previously. Now my ancient .bashrc generates

	setterm: argument error: -background

on login, and nothing that worked before works now. :-(

This is a non backwards compatible change in upstream util-linux:

   commit fb27f91cac9702ad1858d782dd840d5868547423
   Author: Sami Kerola <kerolasa iki.fi>
   Date:   Mon May 19 22:21:14 2014 +0100

     setterm: recommend long options with double hyphen

     While the -version style options will work for next unknown number of
     years start moving towards user interface that has way of invoking long
     options as most of the other commands.

     Signed-off-by: Sami Kerola <kerolasa iki.fi>

so sooner or later it's going to affect all distros ...

My suggestion would be to replace your command with:

   if setterm --help 2>&1 | grep -q -- --background; then
     setterm --foreground white --bold --background blue --blank 59 --store
   else
     setterm -foreground white -bold -background blue -blank 59 -store
   fi

But yes, backwards incompatible changes suck, although in this case
setterm has historically done something non-standard.

	setterm --foreground white --bold --background blue --blank 59 --store

produces nearly the same error message:

	setterm: argument error: --background

Note that the argument the message apparently applies to is neither first nor last.
--
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux