From: Arseny Maslennikov <arseny@altlinux.org>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] /etc/sysconfig/{clock,i18n}
Date: Wed, 31 Mar 2021 13:48:28 +0300
Message-ID: <YGRTfG99WxYj0P+C@cello> (raw)
In-Reply-To: <20210329192437.GD15274@altlinux.org>
[-- Attachment #1: Type: text/plain, Size: 4421 bytes --]
On Mon, Mar 29, 2021 at 10:24:37PM +0300, Dmitry V. Levin wrote:
> On Mon, Mar 29, 2021 at 09:03:20PM +0300, Arseny Maslennikov wrote:
> > [...] вот, допустим, я _ничего_ не знаю
> > об этих файлах и настраиваю те же clock, i18n (как я понимаю эти
> > понятия) другими способами и не жалуюсь на результат. Я при таких
> > вводных никак не могу способствовать предложенному переводу "старых"
> > конфигов в "новые", и заставить не связанные с /etc/rc.d пакеты не
> > зависеть от startup тоже не могу.
>
> clock:
> /etc/sysconfig/clock в пакете самодокументирован,
Задокументирован он, к сожалению, лениво — в стиле "Бетономешалка мешает
бетон". :( Впрочем, если бы он был хорошо самодокументирован, документация
бы составляла более 4/5 его длины.
Воздержусь от подробного разбора, чтобы не засорять рассылку — благо
стало и так понятно, что делать.
> пример использования
> в скрипте, который поддерживает /etc/sysconfig/clock и /etc/timezone:
> /usr/sbin/tzupdate.
Гм.
Пусть тут на всякий случай будет altlinux-classic-clock.service, исполняющий
/etc/rc.d/init.d/clock, который стоит положить в пакет к нему, если это
не будет startup.
Вот канва этого юнита:
---8<--------
[Unit]
Description=/etc/rc.d/init.d/clock
Documentation=
[Service]
Type=oneshot
ExecStart=/etc/rc.d/init.d/clock start
ExecStop=/etc/rc.d/init.d/clock stop
--->8--------
Видимо, в /etc/sysconfig/clock сошлись два назначения: одно —
настраивать /etc/rc.d/init.d/clock, другое — настраивать $ZONE.
Правильно ли я понял, что /etc/localtime мог бы быть и симлинком на
/usr/share/zoneinfo/$ZONE, но для разных сервисов, которые чрутятся средствами
ALT и исполнимого файла update_chrooted, не реализовано воссоздание этих
путей в чруте — и это единственная помеха к превращению /etc/localtime в
симлинк по умолчанию?
* Если да, то надо ZONE делать необязательным (по умолчанию результат
readlink, а если не симлинк, то UTC), а остальное в этом файле
настраивает поведение /etc/rc.d/init.d/clock. Тогда файл можно и в
пакете startup оставить — или в том, в котором /etc/rc.d/init.d/clock.
Ну, и остался вопрос, кто ещё потребляет /etc/sysconfig/clock, кроме
нижеперечисленного (взятого с моей системы):
# grep -r /etc/sysconfig/clock /usr /etc
/usr/sbin/tzupdate:env_file=/etc/sysconfig/clock
/etc/rc.d/init.d/clock:if SourceIfNotEmpty /etc/sysconfig/clock; then
и только ли ZONE= они от него хотят.
>
> i18n:
> /etc/profile.d/lang.sh считает, что /etc/sysconfig/i18n и /etc/locale.conf
> - это одно и то же, использует первый, который найдёт.
>
Правильно ли я понимаю, что формат данных в этих файлах одинаковый, и это
— shell-style связывание параметров вида /(LANG|LC_[A-Z_]*)/ с локалями?
* Если да, то один из этих файлов можно сделать симлинком на другой.
Правда, /lib/systemd/systemd-localed, когда пишет в этот файл (если его
заставить при помощи `localectl set-locale VAR=value'), не сохраняет
комментарии в строках.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-03-31 10:48 UTC|newest]
Thread overview: 87+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-04 15:23 [devel] startup and standalone versions of systemd utilities Alexey Shabalin
2021-02-04 15:45 ` [devel] RemovePathPostfixes Dmitry V. Levin
2021-02-04 16:21 ` Alexey V. Vissarionov
2021-02-04 17:13 ` Dmitry V. Levin
2021-02-04 19:45 ` Alexey V. Vissarionov
2021-02-04 20:12 ` Vladimir D. Seleznev
2021-02-04 21:01 ` Alexey V. Vissarionov
2021-02-04 23:45 ` Paul Wolneykien
2021-02-05 1:31 ` Alexey Shabalin
2021-02-05 2:51 ` Dmitry V. Levin
2021-02-05 9:58 ` Alexey V. Vissarionov
2021-02-07 20:19 ` Alexey Shabalin
2021-02-05 7:33 ` Aleksei Nikiforov
2021-02-05 10:00 ` Alexey V. Vissarionov
2021-02-05 12:14 ` Sergey V Turchin
2021-02-05 12:17 ` Sergey V Turchin
2021-02-05 8:54 ` Paul Wolneykien
2021-02-05 9:15 ` Sergey V Turchin
2021-02-05 10:13 ` Alexey V. Vissarionov
2021-02-05 11:04 ` Sergey V Turchin
2021-02-05 9:41 ` Alexey V. Vissarionov
2021-02-05 9:19 ` Alexey V. Vissarionov
2021-02-05 9:25 ` Sergey V Turchin
2021-02-05 8:05 ` Sergey V Turchin
2021-02-05 8:11 ` Sergey V Turchin
2021-02-05 10:17 ` Alexey V. Vissarionov
2021-02-05 11:11 ` Sergey V Turchin
2021-02-08 2:49 ` Alexey V. Vissarionov
2021-02-08 8:40 ` Sergey V Turchin
2021-02-05 12:10 ` Vladimir D. Seleznev
2021-02-08 2:52 ` Alexey V. Vissarionov
2021-02-08 3:32 ` Vladimir D. Seleznev
2021-02-08 3:38 ` Alexey V. Vissarionov
2021-02-08 3:46 ` Vladimir D. Seleznev
2021-02-04 20:51 ` Sergey Y. Afonin
2021-02-04 20:58 ` Sergey Y. Afonin
2021-02-04 16:34 ` [devel] startup and standalone versions of systemd utilities Alexey Gladkov
2021-02-05 1:52 ` Alexey Shabalin
2021-02-05 10:55 ` Alexey Gladkov
2021-02-08 3:11 ` Alexey V. Vissarionov
2021-02-08 9:34 ` Vladislav Zavjalov
2021-02-08 10:03 ` Alexey V. Vissarionov
2021-02-08 12:52 ` Vladislav Zavjalov
2021-02-08 10:46 ` Alexey Gladkov
2021-02-09 13:03 ` Alexey V. Vissarionov
2021-02-09 13:39 ` Alexey Gladkov
2021-03-17 20:00 ` [devel] Разделение миров systemd и sysv Alexey Shabalin
2021-03-17 22:43 ` Alexey Gladkov
2021-03-19 8:45 ` Andrey Savchenko
2021-03-25 17:53 ` Alexey Shabalin
2021-03-25 16:52 ` Alexey Shabalin
2021-03-25 19:54 ` Alexey Gladkov
2021-03-17 22:43 ` Dmitry V. Levin
2021-03-25 17:28 ` Alexey Shabalin
2021-03-25 18:33 ` Leonid Krivoshein
2021-03-25 20:39 ` Michael Shigorin
2021-03-25 19:44 ` Konstantin Lepikhov
2021-03-25 20:31 ` Michael Shigorin
2021-03-25 19:36 ` [devel] dracut (Re: Разделение миров systemd и sysv) Alexey Sheplyakov
2021-03-26 9:19 ` Anton Farygin
2021-03-26 9:52 ` Andrey Savchenko
2021-03-26 11:04 ` Anton Farygin
2021-03-26 12:42 ` Andrey Savchenko
2021-03-26 15:14 ` Anton Farygin
2021-03-26 11:27 ` Leonid Krivoshein
2021-03-26 13:14 ` Nikolai Kostrigin
2021-03-26 11:13 ` Konstantin Lepikhov
2021-03-31 10:00 ` Alexey V. Vissarionov
2021-03-31 10:30 ` Denis Medvedev
2021-03-19 8:42 ` [devel] Разделение миров systemd и sysv Andrey Savchenko
2021-03-19 10:23 ` Sergey Afonin
2021-03-28 17:33 ` Sergey Y. Afonin
2021-03-25 17:44 ` Alexey Shabalin
2021-03-26 9:45 ` [devel] libsystemd (Re: Разделение миров systemd и sysv) Alexey Sheplyakov
2021-03-26 9:50 ` Andrey Savchenko
2021-03-26 9:59 ` [devel] libsystemd (Re: Разделение миров systemd и =?utf-8?b?IHN5c3Y=?=) Sergey Afonin
2021-03-26 18:43 ` [devel] libsystemd (Re: Разделение миров systemd и sysv) Arseny Maslennikov
2021-03-31 10:39 ` Alexey V. Vissarionov
2021-03-29 18:03 ` [devel] Разделение миров systemd и sysv Arseny Maslennikov
2021-03-29 19:24 ` [devel] /etc/sysconfig/{clock,i18n} Dmitry V. Levin
2021-03-31 10:48 ` Arseny Maslennikov [this message]
2021-02-08 3:08 ` [devel] startup and standalone versions of systemd utilities Alexey V. Vissarionov
2021-02-05 1:37 ` Alexey Shabalin
2021-02-05 10:24 ` Alexey Gladkov
2021-02-08 10:47 ` Alexey Gladkov
2021-02-09 10:42 ` Alexey Shabalin
2021-02-09 11:32 ` Alexey Gladkov
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=YGRTfG99WxYj0P+C@cello \
--to=arseny@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