[arch-projects] (no subject)
At some point I'd like to do something like the following patch for the placement of files to make margianlly more sense. Not going to do it in the immediate future (at least not the next release), but i thought I'd put it out there. TL;DR: put initscript files where they belong without breaking compat or requiring user action. Cheers, Tom
From 4bf1959e3d7d27d6c9d824e3ef932902129f3de3 Mon Sep 17 00:00:00 2001 From: Tom Gundersen <teg@jklm.no> Date: Mon, 13 Feb 2012 15:20:29 +0100 Subject: [RFC][PATCH] move non-config files out of /etc
Place scripts that can be called from the console in /usr/bin, and the rest in /usr/lib/initscripts/. We symlink /etc/rc.d/functions to /usr/lib/initscripts/functions for compatibiliy. On upgrade we also symlink the other scripts, but not on new installs: if [ "$(vercmp $2 2012.0?.1)" -lt 0 ]; then for script in sysinit shutdown single multi; do ln -s "../usr/lib/initscripts/rc.${script}" /etc/ done fi The reason for these symlinks is to avoid issues with people not merging inittab.pacnew. Suggested-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Tom Gundersen <teg@jklm.no> --- Makefile | 11 ++++++----- inittab | 8 ++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 3e83e58..425c38b 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ DIRS := \ /etc/rc.d/functions.d \ /etc/logrotate.d \ /etc/profile.d \ - /usr/sbin \ + /usr/bin \ /etc/tmpfiles.d \ /usr/lib/tmpfiles.d \ /etc/sysctl.d \ @@ -23,15 +23,16 @@ installdirs: install: installdirs doc install -m644 -t $(DESTDIR)/etc inittab rc.conf - install -m755 -t $(DESTDIR)/etc rc.local rc.local.shutdown rc.multi rc.shutdown rc.single rc.sysinit + install -m755 -t $(DESTDIR)/etc rc.local rc.local.shutdown install -m644 -t $(DESTDIR)/etc/logrotate.d bootlog - install -m644 -t $(DESTDIR)/etc/rc.d functions install -m755 -t $(DESTDIR)/etc/rc.d hwclock network netfs install -m755 -t $(DESTDIR)/etc/profile.d locale.sh - install -m755 -t $(DESTDIR)/usr/sbin rc.d + install -m755 -t $(DESTDIR)/usr/bin rc.d install -m644 -t ${DESTDIR}/usr/share/man/man8 rc.d.8 install -m644 -t ${DESTDIR}/usr/share/man/man5 rc.conf.5 locale.conf.5 vconsole.conf.5 hostname.5 - install -m755 -t $(DESTDIR)/usr/lib/initscripts arch-tmpfiles arch-sysctl + install -m755 -t $(DESTDIR)/usr/lib/initscripts arch-tmpfiles arch-sysctl rc.multi rc.shutdown rc.single rc.sysinit + install -m644 -t $(DESTDIR)/usr/lib/initscripts functions + ln -s ../../usr/lib/initscripts/functions $(DESTDIR)/etc/rc.d/ install -m644 tmpfiles.conf $(DESTDIR)/usr/lib/tmpfiles.d/arch.conf install -m644 -T bash-completion $(DESTDIR)/etc/bash_completion.d/rc.d install -m644 -T zsh-completion $(DESTDIR)/usr/share/zsh/site-functions/_rc.d diff --git a/inittab b/inittab index a375f59..ebc282d 100644 --- a/inittab +++ b/inittab @@ -17,10 +17,10 @@ id:3:initdefault: # Boot to X11 #id:5:initdefault: -rc::sysinit:/etc/rc.sysinit -rs:S1:wait:/etc/rc.single -rm:2345:wait:/etc/rc.multi -rh:06:wait:/etc/rc.shutdown +rc::sysinit:/usr/lib/initscripts/rc.sysinit +rs:S1:wait:/usr/lib/initscripts/rc.single +rm:2345:wait:/usr/lib/initscripts/rc.multi +rh:06:wait:/usr/lib/initscripts/rc.shutdown su:S:wait:/sbin/sulogin -p # -8 options fixes umlauts problem on login -- 1.7.9.3
On Mon, 12 Mar 2012 14:20:10 +0100 Tom Gundersen <teg@jklm.no> wrote:
The reason for these symlinks is to avoid issues with people not merging inittab.pacnew.
why not let natural selection do its work? Dieter
On Mon, Mar 12, 2012 at 02:26:40PM +0100, Dieter Plaetinck wrote:
On Mon, 12 Mar 2012 14:20:10 +0100 Tom Gundersen <teg@jklm.no> wrote:
The reason for these symlinks is to avoid issues with people not merging inittab.pacnew.
why not let natural selection do its work?
Dieter
Because breaking people's boot isn't cool (even if it is my job). It doesn't hurt to keep the symlinks around for a while to let people figure out the change. d
On Mon, Mar 12, 2012 at 2:26 PM, Dieter Plaetinck <dieter@plaetinck.be> wrote:
On Mon, 12 Mar 2012 14:20:10 +0100 Tom Gundersen <teg@jklm.no> wrote:
The reason for these symlinks is to avoid issues with people not merging inittab.pacnew.
why not let natural selection do its work?
Because I would be the first to succumb to this ;-) On a serious note: Ignoring .pacsave files from initscripts should never break your boot. -t
Am 12.03.2012 14:39, schrieb Tom Gundersen:
On Mon, Mar 12, 2012 at 2:26 PM, Dieter Plaetinck <dieter@plaetinck.be> wrote:
On Mon, 12 Mar 2012 14:20:10 +0100 Tom Gundersen <teg@jklm.no> wrote:
The reason for these symlinks is to avoid issues with people not merging inittab.pacnew.
why not let natural selection do its work?
Because I would be the first to succumb to this ;-)
On a serious note: Ignoring .pacsave files from initscripts should never break your boot.
In the past, we once adjusted inittab using 'sed'. People protested, but it was important. if [ "$(vercmp $2 2009.07)" -lt 0 ]; then echo "==> Adjusting /etc/inittab for transition to /dev/tty standard." echo "==> Original file saved as /etc/inittab.pacsave" sed -i'.pacsave' 's#vc/\([0-9]\)#tty\1#' /etc/inittab fi We needed to do this when we removed some old devfs-compat device nodes that had been there way too long. This can be done safely.
On 03/12/2012 10:20 AM, Tom Gundersen wrote:
At some point I'd like to do something like the following patch for the placement of files to make margianlly more sense.
Not going to do it in the immediate future (at least not the next release), but i thought I'd put it out there.
TL;DR: put initscript files where they belong without breaking compat or requiring user action.
Cheers,
Tom
Interesting. Any future plans for scripts in /etc/rc.d/* -> /usr/lib/initscripts/rc.d/* or something like this? -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
On Mon, Mar 12, 2012 at 2:57 PM, Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> wrote:
Any future plans for scripts in /etc/rc.d/* -> /usr/lib/initscripts/rc.d/* or something like this?
IMHO it is the right thing to do. However, it would require some work, and the benefits are mostly of an aesthetic nature (the best kind!), so I have no plans of pushing for this anytime soon. Maybe this is something we can revisit if at some point we are within reach of declaring that files should be in /etc if and only if they are in the 'backup' array of their respective packages. (I'm assuming that we are far away from this, but I have never actually checked). -t
participants (5)
-
Dave Reisner
-
Dieter Plaetinck
-
Gerardo Exequiel Pozzi
-
Thomas Bächler
-
Tom Gundersen