Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 237767 - media-gfx/splashutils: grep not in path in splash-functions.sh from (error message "line 135: grep: command not found")
Summary: media-gfx/splashutils: grep not in path in splash-functions.sh from (error m...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Michal Januszewski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-15 18:08 UTC by Brian Mattern
Modified: 2010-01-07 22:41 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Mattern 2008-09-15 18:08:38 UTC
When switching virtual terminals with fb decorations, the following error message is displayed:

/sbin/splash-functions.sh: line 135: grep: command not found

Reproducible: Always

Steps to Reproduce:
1.Install and setup splashutils
2.Change virtual terminals
3.Watch error message flash at top of screen



Expected Results:  
Either the full path needs to be included (for all instances of grep and egrep), or the path needs to be set somewhere before splash-functions.sh is run
Comment 1 Michal Januszewski (RETIRED) gentoo-dev 2008-09-20 18:05:01 UTC
Could you please include the output of your `emerge --info`?
Comment 2 Brian Mattern 2008-09-20 18:53:52 UTC
Portage 2.1.4.4 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2
2.6.25-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.25-gentoo-r7 x86_64 AMD Athlon(tm) 64 X2 Dual Core Pr
000+
Timestamp of tree: Sat, 13 Sep 2008 05:36:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-g"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/4.0/env /usr/kde/4.0/share/config /usr/kd
tdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf 
f /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/u
.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache collision-protect distlocks metadata-transfer parallel
ndbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --
--force --whole-file --delete --stats --timeout=180 --exclude=/distfile
de=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/enlightenment /usr/portage/l
an/science /usr/portage/local/layman/mornifle-gentoo-package"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa amd64 avahi bash-completion berkdb blas blueto
ing bzip2 cairo cdr cli cracklib crypt cups curl dbus djvu dri dvd dvdr
emboss encode esd evo fam fbcon fftw firefox fortran gdbm gif gnuplot g
mer gtk hal iconv ipv6 isdnlog jpeg kde kerberos lapack latex ldap libn
 midi mikmod mmx mp3 mpeg mudflap multilib ncurses nls nptl nptlonly og
openmp pam pcre pdf perl plotutils png postscript ppds pppd python qt3 
t qt4 quicktime readline reflection ruby sdl session spell spl sse sse2
tup-notification svg sysfs tcpd tiff truetype unicode usb vim-syntax vo
posite xinerama xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp at
m bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-
el8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci
M_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file h
58 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug ra
share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alia
non authn_dbm authn_default authn_file authz_dbm authz_default authz_gr
uthz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock de
 disk_cache env expires ext_filter file_cache filter headers include in
nfig logio mem_cache mime mime_magic negotiation rewrite setenvif speli
 unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="
 KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 
txorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 mach64
agic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, L
LL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EX
Comment 3 Michal Januszewski (RETIRED) gentoo-dev 2008-09-21 16:14:31 UTC
Does this happen whenever you switch from any terminal to any other one, or only for some specific combinations?   Are sure sure this is actually _caused_ by switching terminals (in which case you should probably see more and more such messages if you repeat a particular switch sequence)?  The reason I'm asking is that splash-functions.sh should not be used any way when switching terminals with fbcon decorations.  What I think is more likely is that this message is displayed at some point during boot and you then happen to see it when switching terminals.

Did you modify /etc/profile on that system in any way?  Or do you have something in /etc/bash/bashrc that changes the value of PATH?  Does the PATH for the root user include '/bin'?
Comment 4 Brian Mattern 2008-10-04 01:53:05 UTC
The error message was printed only once, but would flash on screen when switching terminals that had a fb based login manager running. The cause was a PATH included in a stale profile.env file that did not include /bin. 

The install is less than 6 months old, and this file was never edited by hand. 'qfile' did not show any packages owning it, so I deleted the file, resolving the original issue. (However, shouldn't emerge have removed this file?)
Comment 5 Michal Januszewski (RETIRED) gentoo-dev 2008-10-04 11:16:05 UTC
(In reply to comment #4)

> The error message was printed only once, but would flash on screen when
> switching terminals that had a fb based login manager running. The cause was a
> PATH included in a stale profile.env file that did not include /bin. 
> 
> The install is less than 6 months old, and this file was never edited by hand.
> 'qfile' did not show any packages owning it, so I deleted the file, resolving
> the original issue. (However, shouldn't emerge have removed this file?)

Well, provile.env is generated by env-update and doesn't belong to any package, so Portage will not remove it.  Also, the PATH variable in profile.env does not need to include '/bin' -- profile.env is sourced in /etc/profile, which is also where the path is extended with all the standard entries (/bin, /usr/bin, etc).

You might want to run `env-update` to regenerate the profile.env file and see whether this changes anything.
Comment 6 Michal Januszewski (RETIRED) gentoo-dev 2008-10-12 10:36:57 UTC
Closing as WORKSFORME since there doesn't seem to be a real problem with splashutils here.
Comment 7 Benjamin Rich 2008-11-24 09:52:07 UTC
I experience the same behaviour.  As mentioned, this appears in terminals running an fb based login manager (e.g. qingy).  I'm not really sure what the recommended fix is.  It seems that deleting the file profile.env is not the correct solution.  Running env-update also does not help.  Should I reopen the bug, or is there a simple solution?
Comment 8 Florian Petran 2009-04-08 15:08:54 UTC
(In reply to comment #7)
> is there a simple solution?
> 

You can insert the following in the beginning of splash-functions.sh to make the error go away:

if [[ $(echo ${PATH}|grep -c "\(^\|:\)/bin:\?") -eq 0 ]]; then
    PATH=/bin:${PATH}
fi


Comment 9 Michal Januszewski (RETIRED) gentoo-dev 2009-04-08 16:54:49 UTC
(In reply to comment #7)

> I experience the same behaviour.  As mentioned, this appears in terminals
> running an fb based login manager (e.g. qingy).  I'm not really sure what the
> recommended fix is.  It seems that deleting the file profile.env is not the
> correct solution.  Running env-update also does not help.  Should I reopen the
> bug, or is there a simple solution?

Could you please post the output of "echo $PATH" run on one of the terminals where you see the problem?  
Comment 10 Benjamin Rich 2009-04-08 20:27:09 UTC
(In reply to comment #9)
> (In reply to comment #7)
> 
> > I experience the same behaviour.  As mentioned, this appears in terminals
> > running an fb based login manager (e.g. qingy).  I'm not really sure what the
> > recommended fix is.  It seems that deleting the file profile.env is not the
> > correct solution.  Running env-update also does not help.  Should I reopen the
> > bug, or is there a simple solution?
> 
> Could you please post the output of "echo $PATH" run on one of the terminals
> where you see the problem?  
> 

As described in the initial post, this error message just flashes briefly at the top of the screen before I am asked to log in (I use qingy).  I'm not really sure how to fulfill your request (do I run "echo $PATH" after logging in?) .  Anyways, it's very easy to ignore so I wouldn't give it much thought (unless you want to :), but thanks anyways.
Comment 11 Michael 2009-07-20 07:38:41 UTC
I get the the same error when using qingy.
My fix: 
Add this:
source /etc/profile 

to the top of /etc/qingy/pre_GUI.sh

Comment 12 JonBoy 2010-01-07 22:41:41 UTC
(In reply to comment #11)
> I get the the same error when using qingy.
> My fix: 
> Add this:
> source /etc/profile 
> 
> to the top of /etc/qingy/pre_GUI.sh
> 

I did a little digging and found the error is coming from /etc/init.d/gpm when /etc/qingy/preInit.sh calls it to check the status of gpm.

The path is correct within pre_GUI.sh itself but doesn't get passed to the environment of the init script.

I added 
  export PATH
to the top of the preGUI.sh script.