ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: "Anton V. Denisov" <fire@kgpu.kamchatka.ru>
To: <sisyphus@altlinux.ru>
Subject: [sisyphus] Q: Multiply /etc/profile.d/ sourcing
Date: Thu, 10 Apr 2003 12:22:39 +1200
Message-ID: <014101c2fef7$4bb58640$3a0aa8c0@4311ntws> (raw)

Приветствую всех.

Поставил тут ради интереса пакет linter с 9 диска Мастер 2.2, в состав
которого входит файл /etc/profile.d/linter.sh следующего содержания:
#!/bin/sh
PATH=$PATH:/opt/linter/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/linter/bin
PERL5LIB=$PERL5LIB:/opt/linter/bin
export PATH LD_LIBRARY_PATH PERL5LIB

Так вот с этим файлом начинается самое интересное: пользователь логинится в
обычную консоль и получаем:

$ echo $LD_LIBRARY_PATH
:/opt/linter/bin

затем через startx запускаем X'ы, там запускаем любой эмулятор терминала и
получаем:

$ echo $LD_LIBRARY_PATH


Хотя
$ echo $PERL5LIB
:/opt/linter/bin:/opt/linter/bin

Так почему обнулилась переменная $LD_LIBRARY_PATH и почему
/etc/profile.d/linter.sh выполнялся дважды? Это всё происходит у
пользователя с bash в качестве оболочки. У пользователя с zsh в качестве
оболочки ещё более интересные результаты - при аналогичной процедуре
запуска X'ов /etc/profile.d/linter.sh выполнился 3 раза (судя по
содержимому переменной $PERL5LIB) а значение $LD_LIBRARY_PATH осталось
:/opt/linter/bin

С уважением, Антон В. Денисов.




             reply	other threads:[~2003-04-10  0:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-10  0:22 Anton V. Denisov [this message]
2003-04-10  8:49 ` Dmitry V. Levin
2003-04-10  8:56   ` Re[2]: " Evgeny Yugov
2003-04-10 10:55     ` Stanislav Ievlev

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='014101c2fef7$4bb58640$3a0aa8c0@4311ntws' \
    --to=fire@kgpu.kamchatka.ru \
    --cc=sisyphus@altlinux.ru \
    /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