не работает скрипт из /etc/profile.d
Sergey Markelov
sergio_nsk на yahoo.de
Вт Окт 8 03:36:38 UTC 2013
Здесь всё написано:
http://askubuntu.com/questions/247738/why-is-etc-profile-not-invoked-for-non-login-shells
Если кратко, используй /etc/bash.bashrc вместо /etc/profile
07.10.2013 17:14, Vladimir Skubriev writes:
> Почему если я пропишу
>
>
> HISTTIMEFORMAT="%d/%m/%y %T "
> HISTCONTROL=ignoredups:erasedups # no duplicate entries
> HISTSIZE=100000 # big big history
> HISTFILESIZE=100000 # big big history
>
> export HISTTIMEFORMAT HISTCONTROL HISTSIZE HISTFILESIZE
>
> в /etc/bash.bashrc переменные окружения задаются
>
> а если я пропишу это в histappend.sh* - то нет ?
>
> ll /etc/profile.d/
> total 24
> drwxr-xr-x 2 root root 4096 Oct 7 12:36 ./
> drwxr-xr-x 155 root root 12288 Oct 4 08:52 ../
> -rw-r--r-- 1 root root 475 Mar 31 2012 bash_completion.sh
> -rwxr-xr-x 1 root root 684 Oct 7 13:58 histappend.sh*
>
> cat /etc/profile
> # /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
> # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
>
> if [ "$PS1" ]; then
> if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
> # The file bash.bashrc already sets the default PS1.
> # PS1='\h:\w\$ '
> if [ -f /etc/bash.bashrc ]; then
> . /etc/bash.bashrc
> fi
> else
> if [ "`id -u`" -eq 0 ]; then
> PS1='# '
> else
> PS1='$ '
> fi
> fi
> fi
>
> # The default umask is now handled by pam_umask.
> # See pam_umask(8) and /etc/login.defs.
>
> if [ -d /etc/profile.d ]; then
> for i in /etc/profile.d/*.sh; do
> if [ -r $i ]; then
> . $i
> fi
> done
> unset i
> fi
>
>
More information about the ubuntu-ru
mailing list