From: "Vladimir D. Seleznev" <vseleznv@altlinux.org>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] Hook-и для регистрации shell-ов в /etc/shell
Date: Thu, 21 May 2020 17:02:27 +0300
Message-ID: <20200521140227.GA3601340@portlab> (raw)
In-Reply-To: <20200521042827.GL32613@altlinux.org>
On Thu, May 21, 2020 at 07:28:27AM +0300, Alexey V. Vissarionov wrote:
> On 2020-05-20 23:44:48 +0300, Aleksey Cheusov wrote:
>
> > Просмотрел несколько спеков на пакеты группы Shells и не нашел
> > никаких хуков для регистрации шелов в /etc/shells. Я правильно
> > понимаю, что в AltLinux их просто нет,
>
> Да.
>
> > и сисадмин руками вписывает туда разрешенные шелы?
>
> Нет:
>
> %post
> fgrep -qx ^/bin/csh /etc/shells || echo /bin/csh >> /etc/shells
> fgrep -qx ^/bin/tcsh /etc/shells || echo /bin/tcsh >> /etc/shells
>
> %postun
> sed -i -re '/^\/bin\/t\?csh/d' /etc/shells
В таком виде никуда не годится. Если удалять шелл при удалении пакета,
то обязательно с проверкой условия:
%postun
if [ $1 -eq 0 ]; then
# то, что нужно сделать
fi
Иначе запись о шелле удалится при обновлении пакета.
https://www.altlinux.org/SpecTips/triggers
> Как нетрудно догадаться, это про tcsh, но можно использовать и для
> других шеллов после тривиальных изменений.
--
WBR,
Vladimir D. Seleznev
next prev parent reply other threads:[~2020-05-21 14:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-20 20:44 Aleksey Cheusov
2020-05-21 4:28 ` Alexey V. Vissarionov
2020-05-21 14:02 ` Vladimir D. Seleznev [this message]
2020-05-21 14:14 ` Alexey V. Vissarionov
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=20200521140227.GA3601340@portlab \
--to=vseleznv@altlinux.org \
--cc=devel@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 Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/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 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git