ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Eugene Prokopiev <prokopiev@stc.donpac.ru>
To: ALT Linux Sisyphus discussion list <sisyphus@lists.altlinux.org>
Subject: Re: [sisyphus] bash: export JAVA_HOME
Date: Mon, 10 Jul 2006 15:14:27 +0400
Message-ID: <44B23693.5030809@stc.donpac.ru> (raw)
In-Reply-To: <20060710101403.GF7055@immo.ru>

Alexey I. Froloff пишет:
> * Eugene Prokopiev <prokopiev@> [060710 14:11]:
> 
>># cat /usr/lib/j2se1.5-sun/j2se.sh
>>export JAVA_HOME="/usr/lib/j2se1.5-sun"
>># /usr/lib/j2se1.5-sun/j2se.sh
> 
> Попробуйте вместо этого сделать
> . /usr/lib/j2se1.5-sun/j2se.sh

Да, работает ...

Теперь главный вопрос: как сделать, чтоб после логина пользователя он 
видел бы в переменной JAVA_HOME /usr/lib/j2se1.5-sun. Исправил 
/etc/profile так:

for f in /etc/profile.d/*.sh; do
         echo "outer : $f"
         if [ -f "$f" -a -r "$f" -a -x "$f" -a -s "$f" -a ! -L "$f" ]; then
                 echo "inner : $f"
                 . "$f" &> /tmp/fff
         fi
done

если запускать его вручную, то я вижу:

$ . /etc/profile
outer : /etc/profile.d/0lang.sh
inner : /etc/profile.d/0lang.sh
outer : /etc/profile.d/color_ls.sh
inner : /etc/profile.d/color_ls.sh
outer : /etc/profile.d/configure_keyboard.sh
inner : /etc/profile.d/configure_keyboard.sh
outer : /etc/profile.d/console.sh
inner : /etc/profile.d/console.sh
outer : /etc/profile.d/j2se.sh
outer : /etc/profile.d/lang.sh
outer : /etc/profile.d/less.sh
inner : /etc/profile.d/less.sh
outer : /etc/profile.d/libglib2.sh
inner : /etc/profile.d/libglib2.sh
outer : /etc/profile.d/shared-mime-info.sh
inner : /etc/profile.d/shared-mime-info.sh
outer : /etc/profile.d/tmpdir.sh
inner : /etc/profile.d/tmpdir.sh
outer : /etc/profile.d/xhost.sh
inner : /etc/profile.d/xhost.sh

$ ls -la /etc/profile.d
total 80
drwxr-xr-x  2 root root 4096 Jul 10 13:11 .
drwxr-xr-x 67 root root 4096 Jul 10 12:20 ..
-rwxr-xr-x  1 root root 1569 May 18 13:03 0lang.csh
-rwxr-xr-x  1 root root 1792 May 18 13:03 0lang.sh
-rwxr-xr-x  1 root root  511 May 22 18:12 color_ls.csh
-rwxr-xr-x  1 root root  787 May 22 18:12 color_ls.sh
-rwxr-xr-x  1 root root  196 May 18 13:03 configure_keyboard.csh
-rwxr-xr-x  1 root root  207 May 18 13:03 configure_keyboard.sh
-rwxr-xr-x  1 root root  286 May 18 13:03 console.csh
-rwxr-xr-x  1 root root  267 May 18 13:03 console.sh
lrwxrwxrwx  1 root root   47 Jul 10 12:21 j2se.csh -> 
/etc/alternatives/links/|etc|profile.d|j2se.csh
lrwxrwxrwx  1 root root   46 Jul 10 12:21 j2se.sh -> 
/etc/alternatives/links/|etc|profile.d|j2se.sh
lrwxrwxrwx  1 root root    9 May 18 13:03 lang.csh -> 0lang.csh
lrwxrwxrwx  1 root root    8 May 18 13:03 lang.sh -> 0lang.sh
-rwxr-xr-x  1 root root  164 May 18 13:03 less.csh
-rwxr-xr-x  1 root root  241 May 18 13:03 less.sh
-rwxr-xr-x  1 root root  474 Apr 10 17:47 libglib2.csh
-rwxr-xr-x  1 root root  467 Apr 10 17:47 libglib2.sh
-rwxr-xr-x  1 root root   45 May 18 13:03 shared-mime-info.csh
-rwxr-xr-x  1 root root   45 May 18 13:03 shared-mime-info.sh
-rwxr-xr-x  1 root root  627 May 18 13:03 tmpdir.csh
-rwxr-xr-x  1 root root  426 May 18 13:03 tmpdir.sh
-rwxr-xr-x  1 root root  180 May 18 13:03 xhost.csh
-rwxr-xr-x  1 root root  172 May 18 13:03 xhost.sh

Т.е. выпадают ссылки, ведущие наружу. Вопрос: что делает if в profile, 
делает ли он это правильно (что тогда неправильно?) или нет (как тогда 
исправить?)

-- 
С уважением, Прокопьев Евгений



  reply	other threads:[~2006-07-10 11:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-10  9:12 [sisyphus] # cat /usr/lib/j2se1.5-sun/j2se.sh JAVA_HOME=/usr/lib/j2se1.5-sun Eugene Prokopiev
2006-07-10 10:11 ` [sisyphus] bash: export JAVA_HOME Eugene Prokopiev
2006-07-10 10:14   ` Alexey I. Froloff
2006-07-10 11:14     ` Eugene Prokopiev [this message]
2006-07-10 12:06       ` Yuriy Kashirin
2006-07-10 13:14         ` Eugene Prokopiev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44B23693.5030809@stc.donpac.ru \
    --to=prokopiev@stc.donpac.ru \
    --cc=sisyphus@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git