Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Problem with bash-completion?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
Ato
n00b
n00b


Joined: 22 Dec 2007
Posts: 66
Location: Duisburg, Germany

PostPosted: Fri Jun 05, 2009 8:43 pm    Post subject: [SOLVED] Problem with bash-completion? Reply with quote

Hi,

since some time now su'ing into the root account prints out some annoying lines:

Code:
thomas@mac ~ 5 su -l root
Password:
-su: little-endian?=false: command not found
-su: real-mode?=false: command not found
-su: auto-boot?=true: command not found
-su: diag-switch?=false: command not found
-su: fcode-debug?=false: command not found
-su: oem-banner?=false: command not found
-su: oem-logo?=false: command not found
-su: use-nvramrc?=false: command not found
-su: use-generic?=false: command not found
-su: default-mac-address?=false: command not found
-su: scroll-lock=true: command not found
-su: skip-netboot?=false: command not found
-su: real-base=-1: command not found
-su: real-size=-1: command not found
-su: load-base=0x800000: command not found
-su: virt-base=-1: command not found
-su: virt-size=-1: command not found
-su: logger-base=-1: command not found
-su: logger-size=-1: command not found
-su: pci-probe-mask=-1: command not found
-su: screen-#columns=100: command not found
-su: screen-#rows=40: command not found
-su: selftest-#megs=0: command not found
-su: boot-volume=3: command not found
-su: gmt-offset=0: command not found
-su: boot-file=: command not found
-su: boot-screen=screen: command not found
-su: console-screen=screen: command not found
-su: diag-device=enet: command not found
-su: diag-file=,diags: command not found
-su: input-device=keyboard: command not found
-su: output-device=screen: command not found
-su: input-device-1=/ipc: No such file or directory
-su: output-device-1=/ipc: No such file or directory
-su: mouse-device=mouse: command not found
-su: oem-banner=: command not found
-su: oem-logo=: command not found
-su: boot-command=mac-boot: command not found
-su: default-client-ip=: command not found
-su: default-server-ip=: command not found
-su: default-gateway-ip=: command not found
-su: default-subnet-mask=: command not found
-su: default-router-ip=: command not found
-su: boot-script=: command not found
-su: aapl,pci=/@f0000000/@10�R2AD�%�����������4�����������*����������▒�: No such file or directory
-su: boot-args=: command not found
-su: aapl,tdm-units=: command not found
-su: boot-device=hd:2,\:tbxi: command not found
-su: prev-lang:kbd=en:0: command not found
-su: platform-uuid=������: command not found
-su: ram-size=0x40000000: command not found
-su: boot-once=: command not found


I guess it started around the last two bash-completion updates (Gentoo profile 2008.0), because before them I never saw those before. Anybody got a clue what I am up against?

.bashrc is the normal root thing, bash-completion is selected system-wide.

Thanks in advance,
Thomas


Last edited by Ato on Tue Jun 09, 2009 3:23 pm; edited 1 time in total
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Sat Jun 06, 2009 10:45 am    Post subject: Reply with quote

I'm not sure it's related to the bash completion.

You said ~root/.bashrc was a normal .bashrc file, care to paste it anyway, as well as the ~root/.bash_profile file?

you can try grep also to find where these messages come from:
Code:
grep little-endian -lr /etc /usr 2>/dev/null

_________________
The End of the Internet!
Back to top
View user's profile Send private message
Ato
n00b
n00b


Joined: 22 Dec 2007
Posts: 66
Location: Duisburg, Germany

PostPosted: Sun Jun 07, 2009 3:32 pm    Post subject: Reply with quote

No .bash_profile for root.

Code:
mac ~ # cat .bashrc
# /etc/skel/.bashrc:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/skel/.bashrc,v 1.8 2003/02/28 15:45:35 azarah Exp $

# This file is sourced by all *interactive* bash shells on startup.  This
# file *should generate no output* or it will break the scp and rcp commands.

# Colors for ls, etc.
eval `dircolors -b /etc/DIR_COLORS`
#alias d="ls --color"
#alias ls="ls --color=auto"
#alias ll="ls --color -l"

# Change the window title of X terminals
case $TERM in
        xterm*|rxvt|Eterm|eterm)
                PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
                ;;
        screen)
                PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
                ;;
esac

## Uncomment the following to activate bash-completion:
[ -f /etc/profile.d/bash-completion.sh ] && source /etc/profile.d/bash-completion.sh

## Set up environment when su'ed to root:
[ -f /etc/profile ] && source /etc/profile

if [ -f /usr/share/mc/mc.gentoo ]; then
        . /usr/share/mc/mc.gentoo
fi


A grep won't tell us much becuase the output is the result of nvsetenv.
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Sun Jun 07, 2009 6:05 pm    Post subject: Reply with quote

what is this file /usr/share/mc/mc.gentoo ?

and what is nvsetenv?
_________________
The End of the Internet!
Back to top
View user's profile Send private message
Ato
n00b
n00b


Joined: 22 Dec 2007
Posts: 66
Location: Duisburg, Germany

PostPosted: Sun Jun 07, 2009 8:54 pm    Post subject: Reply with quote

nvsetenv is a ppc utility packet which allows to modify settings stored in the non-volatile OpenFirmware RAM. For instance it allows you to have the computer boot up after power failure instead of staying powered of which is the default setting after every boot.

Code:
thomas@mac ~ 5 cat /usr/share/mc/mc.gentoo
#!/bin/sh

# A little fix so mc exits into it's current working directory
MC_ENV=/usr/share/mc/bin/mc.sh

for i in $MC_ENV; do
        if [ -x $i ]; then
                . $i
        fi
done

# include this, so also xterm,kterm,gterm,etc will have default bash settings

#if [ "x$SHLVL" != "x1" ]; then # We're not a login shell
#       . /etc/profile
#fi


The file is untouched.
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Mon Jun 08, 2009 9:42 am    Post subject: Reply with quote

The thing is that message like this one:
Code:
little-endian?=false: command not found
makes me think about things we can have in shell scripts:
Code:
: ${little-endian?=false}
which means if the variable little-endian is not defined, set it to 'false'

But somehow something is wrong :/

Did you change your default shell recently?
(I'm asking this, cause I'm not sure hyphen are allowed in a variable name for a POSIX shell)



Quote:
A grep won't tell us much because the output is the result of nvsetenv

Ok, but as I don't know this command and don't have it here, what exactly is the result? which are the matching files?

And, can you also show us this file /usr/share/mc/bin/mc.sh?
_________________
The End of the Internet!
Back to top
View user's profile Send private message
Ato
n00b
n00b


Joined: 22 Dec 2007
Posts: 66
Location: Duisburg, Germany

PostPosted: Mon Jun 08, 2009 3:24 pm    Post subject: Reply with quote

Never mind. I found to my surprise a directory named .bash_completion.d in ~root and had a look at it. Surprise, surprise, there was a symlink to ~root/nvram.txt. I created ~root/nvram.txt aeons ago to see which OF settings are available. Don't ask me how the symlink ended up there but it was never intended. Problem was obviously the wetware, not the software.

Thanks for asking the right questions and making me look harder.

Cheers,
Thomas
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Mon Jun 08, 2009 7:00 pm    Post subject: Reply with quote

glad you found what was wrong:)

can you tag your thread as [SOLVED] ;)
_________________
The End of the Internet!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum