repository

Carbs Linux repositories
git clone git://git.carbslinux.org/repository
Log | Files | Refs | README | LICENSE

commit a24f617e22453a8aef55ba4f717c35ab83b8d85b
parent 4c911934329ee90fbb29657af4d53c6a1fad8ac7
Author: Cem Keylan <cem@ckyln.com>
Date:   Tue, 16 Feb 2021 15:19:38 +0300

baselayout: bump to 2

Diffstat:
Mcore/baselayout/build | 2++
Mcore/baselayout/checksums | 1+
Acore/baselayout/files/install-sv | 34++++++++++++++++++++++++++++++++++
Mcore/baselayout/sources | 1+
Mcore/baselayout/version | 2+-
5 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/core/baselayout/build b/core/baselayout/build @@ -70,4 +70,6 @@ kinstall_t 644 "$1/etc" fstab group host.conf hosts issue keymap os-release \ passwd profile securetty shells mime.types kinstall_t 600 "$1/etc" crypttab shadow +kinstall_t 755 "$1/usr/bin" install-sv + ln -s /proc/self/mounts "$1/etc/mtab" diff --git a/core/baselayout/checksums b/core/baselayout/checksums @@ -1,4 +1,5 @@ 3698c87cc3af757f0302f6d7f034350b1b22a7f25b2f71944292d0fb3de67cd7 crypttab +898834c6adcadd039e56b7c362ae357a54166a7c01348c6413a4117e662e4605 install-sv f85cb0b07f49ff20c4838c267ffb093a136fb5bfdf01badcb03eced852ffea89 fstab 38c9f4047ba597248ef199a77afbd36f873cfa4aeb70de90bac7f237faf2ecba group a0fa9cd303cf7f1718f51e5624a671a418946718b790508b8988bccd542c6451 host.conf diff --git a/core/baselayout/files/install-sv b/core/baselayout/files/install-sv @@ -0,0 +1,34 @@ +#!/bin/sh -e +# Carbs Linux service installer + +usage() { + printf '%s\n' \ + "usage: ${0##*/} [FILE...]" \ + "or: ${0##*/} [-a NAME FILE]" "" \ + "You can set the DESTDIR environment variable to set a different root." + exit 1 +} + +svname='' +case "$1" in + --help|-h|'') usage ;; + -a) [ "$#" -eq 3 ] || usage + svname=$2; shift 2 +esac + +for service; do + # Remove .run suffix and the directory name for service files. + sv=${svname:-${service%.run}} sv=${sv##*/} + + # Create the service directories and copy the service file to them. + mkdir -p "$DESTDIR/etc/sysmgr" "$DESTDIR/etc/sv/$sv" + cp "$service" "$DESTDIR/etc/sysmgr/$sv" + cp "$service" "$DESTDIR/etc/sv/$sv/run" + + # Set permissions for the services. + chmod 0755 "$DESTDIR/etc/sysmgr/$sv" "$DESTDIR/etc/sv/$sv/run" + + # Create supervise directories for runit. + ln -s "/run/runit/supervise.$sv" "$DESTDIR/etc/sv/$sv/supervise" + +done diff --git a/core/baselayout/sources b/core/baselayout/sources @@ -1,4 +1,5 @@ files/crypttab +files/install-sv files/fstab files/group files/host.conf diff --git a/core/baselayout/version b/core/baselayout/version @@ -1 +1 @@ -1 5 +2 1