Hi Beat,
Why not just remove bash-completion?
Regards,
Punky
On 7/12/2011 11:26 AM, Beat Meier wrote:
Hello
The problem of slow ssh login on voyage-0.7.0 (0.6.X and 0.7.5 maybe too) is a
problem of sourcing environment at login.
/etc/profile will source everything in /etc/profile.d which ends with .sh
and this is bash_completion.sh and this will source
/etc/bash_completion
which is the problem of the login delay!!
In my case (wrap2c) it takes 9sec!! until you get the prompt!!!
I have several nagios plugins which login with ssh and this did timeout because
of that!!
The /etc/bash_completion will source all files in /etc/bash_completion.d and
before that a list
and this stuff is the most time consuming job of the script
If you disable the loading of all this scripts in /etc/bash_completion.d
(line1583-1623) you will go to about 2sec delay
If you disable the whole stuff loading from /etc/profile.d in /etc/profile ssh
login will have no notable delay.
So if you really want to use ssh login on wrap with new voyage (debian)
versions you should do the following
in /etc/profile (command completion does still work, this is what i really need, other stuff like mac host etc. I
don't care about)
Comment the last block:
#if [ -d /etc/profile.d ]; then
# for i in /etc/profile.d/*.sh; do
# if [ -r $i ]; then
# . $i
# fi
# done
# unset i
#fi
Hope this help other people....
A solution to include in voyage distro could be:
Define in /etc/default/voyage-util
------ CUT HERE ------
### If enabled /etc/profile will not source the stuff in /etc/profile.d
#VOYAGE_SSH_PROF_PATCH="YES"
------ CUT HERE ------
and change /etc/profile to
------ CUT HERE ------
. /etc/default/voyage-util
if [ -z "$VOYAGE_SSH_PROF_PATCH" ]; then
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi
fi
------ CUT HERE ------
Was tested and should work...
Punky what do you think?
Greetings
Beat
_______________________________________________
Voyage-linux mailing list
Voyage-linux@list.voyage.hk
http://list.voyage.hk/mailman/listinfo/voyage-linux
--
Regards,
Kim-man "Punky" Tse
* Open Source Embedded Solutions and Systems
- Voyage Linux (http://linux.voyage.hk)
- Voyage ONE (http://linux.voyage.hk/voyage-one)
- Voyage MPD (http://linux.voyage.hk/voyage-mpd)
* Voyage Store (http://store.voyage.hk)
_______________________________________________
Voyage-linux mailing list
Voyage-linux@list.voyage.hk
http://list.voyage.hk/mailman/listinfo/voyage-linux