Solved [solved] source: not found

Hi,

It has been a few days since I'm receiving this error when logging in as an SSH user or when I start/stop some of the system's services, e.g.:

At login time:
Code:
Last login: Sat Aug  2 11:08:55 2014 from xxx.xxx.xxx.xxx
FreeBSD 10.0-RELEASE-p7 (GENERIC) #0 r269275M: Wed Jul 30 03:39:57 UTC 2014
source: not found
If you need a reminder to leave your terminal, type "leave +hhmm" where
"hhmm" represents in how many hours and minutes you need to leave.
                -- Dru <genesis@istar.ca>

service postgresql restart
Code:
source: not found
LOG:  ending log output to stderr
HINT:  Future log output will go to log destination "syslog".

Has anyone ever faced such a problem?
 
Re: source: not found

Quick question: do you have any source or . (dot) commands in your shell initialisation files (e.g. ~/.login, ~/.profile) or their system-wide equivalents? The error message you're mentioning is what sh says when it cannot find a file it's instructed to source.
 
Re: source: not found

Thanks for the answer, @fonz.

This is my ~/.login:
Code:
# $FreeBSD: release/9.2.0/share/skel/dot.login 190477 2009-03-27 21:13:14Z ru $
#
# .login - csh login script, read by login shell, after `.cshrc' at login.
#
# see also csh(1), environ(7).
#

if ( -x /usr/games/fortune ) /usr/games/fortune freebsd-tips

And ~/.profile
Code:
# $FreeBSD: release/9.2.0/share/skel/dot.profile 199243 2009-11-13 05:54:55Z ed $
#
# .profile - Bourne Shell startup script for login shells
#
# see also sh(1), environ(7).
#

# remove /usr/games if you want
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:$HOME/bin; export PATH

# Setting TERM is normally done through /etc/ttys.  Do only override
# if you're sure that you'll never log in via telnet or xterm or a
# serial line.
# TERM=xterm;   export TERM

BLOCKSIZE=K;    export BLOCKSIZE
EDITOR=/usr/local/bin/nano;     export EDITOR
PAGER=more;     export PAGER

# set ENV to a file invoked each time sh is started for interactive use.
ENV=$HOME/.shrc; export ENV

if [ -x /usr/games/fortune ] ; then /usr/games/fortune freebsd-tips ; fi
 
Last edited by a moderator:
Re: source: not found

Does it give that error only when services are started or stopped, or on every command? Which shell is used?
 
Re: source: not found

I'm using sh for the SSH user (which gives the error on login) and csh for the root user (no error on login). As I said for some services it gives this error, such as postgresql and gitlab. But for the other ones such as named or nginx, it won't show any error.

Also, I have to mention that a few days ago I updated all my ports and did a world and kernel rebuild (it was 10.0-RELEASE-p6 and I upgraded to 10.0-RELEASE-p7). And, from what I recall after that I was getting this error. I already removed /usr/src and /usr/obj and did a checkout from the releng branch and rebuilt the world and kernel again without any success on the error. It may be an issue with the upgraded ports.

I believe this updating procedure also broke my GitLab installation, too. After this error's appearance I have to restart the gitlab service or I'll get a
Code:
502 Bad Gateway
error on my browser.

I've never had such an issue in the past four years with this FreeBSD installation.
 
Re: source: not found

NuLL3rr0r said:
I'm using sh for the ssh user (which gives the error on login) and csh for root user (no error on login).
What's in /etc/profile?
 
Re: source: not found

@@SirDice, thank you so much. You nailed it!

There was this line at the end of /etc/profile.
Code:
test -f /etc/profile.d/rvm.sh && source /etc/profile.d/rvm.sh

I remember I was messing with RVM during the past week. I commented that line and everything is back to normal now.

Thank you all for your help :)
 
Last edited by a moderator:
@@fonz: Sorry for reading your answer cursorily. Anyway, thank you for pointing that out :)
 
Last edited by a moderator:
Back
Top