[arch-projects] (no subject)

Tom Gundersen teg at jklm.no
Mon Mar 12 09:20:10 EDT 2012

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.



>From 4bf1959e3d7d27d6c9d824e3ef932902129f3de3 Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg at 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/

The reason for these symlinks is to avoid issues with people not merging

Suggested-by: Florian Pritz <bluewind at xinu.at>
Signed-off-by: Tom Gundersen <teg at 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
 su:S:wait:/sbin/sulogin -p
 # -8 options fixes umlauts problem on login

More information about the arch-projects mailing list