Fixed numerous path issues in s6-scripts;

Fix sbin handling in hhl.script.mk
This commit is contained in:
Nathan Fisher 2022-08-25 13:13:16 -04:00
parent cd021883f5
commit 828f465435
55 changed files with 3152 additions and 2729 deletions

View File

@ -7,12 +7,12 @@ include world.mk
include hhl.doc.mk
include hhl.colors.mk
ifneq (${sbin},true)
installdirs = ${bindir}
binprog = ${bindir}/${progname}
else
ifeq (${sbin},1)
installdirs = ${sbindir}
binprog = ${sbindir}/${progname}
else
installdirs = ${bindir}
binprog = ${bindir}/${progname}
endif
bins = ${binprog} ${binlinks}

View File

@ -8,14 +8,14 @@ argp-standalone_version = 1.4.1
attr_version = 2.5.1
autoconf_version = 2.71
automake_version = 1.16.5
bc_version = 5.2.2
bc_version = 6.0.1
binutils_version = 2.39
bison_version = 3.8.2
busybox_version = 1.31.1
bzip2_version = 1.0.8
cmake_version = 3.18.1
coreutils_version = 8.32
curl_version = 7.71.0
curl_version = 7.84.0
dash_version = 0.5.11
dbus_version = 1.12.18
diffutils_version = 3.8
@ -23,7 +23,7 @@ dhcpcd_version = 8.1.6
e2fsprogs_version = 1.46.5
elfutils_version = 0.186
eudev_version = 3.2.11
execline_version = 2.8.3.0
execline_version = 2.9.0.1
expat_version = 2.4.8
file_version = 5.41
findutils_version = 4.9.0
@ -73,19 +73,19 @@ ninja_version = 1.10.2
openssl_version = 3.0.1
patch_version = 2.7.6
pcre_version = 8.45
perl_version = 5.34.1
perl_version = 5.36.0
perl-cross_version = 1.3.5
pkg-config_version = 0.29.2
pkgsrc_version = 2020Q3
procps-ng_version = 3.3.16
psmisc_version = 23.4
python_version = 3.10.2
s6_version = 2.11.1.0
s6-linux-init_version = 1.0.7.3
s6-rc_version = 0.5.3.1
s6_version = 2.11.1.2
s6-linux-init_version = 1.0.8.0
s6-rc_version = 0.5.3.2
sed_version = 4.8
shadow_version = 4.11.1
skalibs_version = 2.11.2.0
skalibs_version = 2.12.0.1
sysklogd_version = 1.5.1
tar_version = 1.34
texinfo_version = 6.8

File diff suppressed because it is too large Load Diff

View File

@ -8,5 +8,5 @@ export CC = $(tgt)-gcc
export HOSTCC = gcc
export HOSTCFLAGS = -std=c99
export CFLAGS = -std=c99 --sysroot=$(DESTDIR)
config_cmd = cd $(objdir) && $(srcdir)/configure.sh -G -O3
config_cmd = cd $(objdir) && $(srcdir)/configure -G -O3
include targets.mk

View File

@ -1,10 +1,12 @@
# Makefile - hhl - /src/world/bin/s6-scripts
# Copyright 2021 Nathan Fisher <nfisher.sr@gmail.com>
#
progname = init
progname = init
export exec_prefix = $(DESTDIR)
export sbin = 1
include hhl.script.mk
sysctl_libdir = $(DESTDIR)/usr/lib/sysctl.d
sysctl_libdir = $(DESTDIR)/usr/lib/sysctl.d
install: $(sysctl_libdir)/50-default.conf install_conf

View File

@ -1,3 +1,3 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
s6-linux-init-shutdown -a -r -- now

View File

@ -1,3 +1,3 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
s6-linux-init-shutdown -a -p -- now

View File

@ -1,2 +1,2 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P

View File

@ -1,2 +1,2 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P

View File

@ -1,3 +1,3 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
s6-linux-init-shutdown -a -p -- now

View File

@ -1,3 +1,3 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
s6-linux-init-shutdown -a -h -- now

View File

@ -1,2 +1,2 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
redirfd -w 2 /dev/console
fdmove -c 1 2

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
redirfd -w 2 /dev/console
fdmove -c 1 2

View File

@ -1,3 +1,3 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
/sbin/agetty -L -8 tty1 115200
/sbin/getty tty1

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
fdmove -c 2 1
fdmove 1 3

View File

@ -1,3 +1,3 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
s6-linux-init-shutdownd -c "/etc/s6/current" -g 3000

View File

@ -1,2 +1,2 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
foreground { sh /etc/s6/sv/binfmt/shell_up }

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
foreground { install -m0664 -o root -g utmp /dev/null /run/utmp }
foreground { if -t -n { test -e /var/log/wtmp } install -m0664 -o root -g utmp /dev/null /var/log/wtmp }
foreground { if -t -n { test -e /var/log/btmp } install -m0600 -o root -g utmp /dev/null /var/log/btmp }

View File

@ -1,2 +1,2 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
exec sh /etc/s6/sv/console-setup/shell_up

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
foreground { if -n -t { test -d /var/log/dmesg } install -d -m 0755 -o s6log -g s6log /var/log/dmesg }
envfile /etc/s6/sv/dmesg/conf
importas -sCiu DIRECTIVES DIRECTIVES

View File

@ -1 +1 @@
agetty-tty1
getty-tty1

View File

@ -1,2 +1,2 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
exec s6-svc -d /run/service/s6-linux-init-early-getty

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
if { pipeline { redirfd -w 2 /dev/null s6-rc -a list } grep -qFx mount-filesystems }
envfile /etc/s6/sv/getty-tty1/conf
importas -iu SPAWN SPAWN

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
if { pipeline { redirfd -w 2 /dev/null s6-rc -a list } grep -qFx mount-filesystems }
envfile /etc/s6/sv/getty-tty2/conf
importas -iu SPAWN SPAWN

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
if { pipeline { redirfd -w 2 /dev/null s6-rc -a list } grep -qFx mount-filesystems }
envfile /etc/s6/sv/getty-tty3/conf
importas -iu SPAWN SPAWN

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
if { pipeline { redirfd -w 2 /dev/null s6-rc -a list } grep -qFx mount-filesystems }
envfile /etc/s6/sv/getty-tty4/conf
importas -iu SPAWN SPAWN

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
if { pipeline { redirfd -w 2 /dev/null s6-rc -a list } grep -qFx mount-filesystems }
envfile /etc/s6/sv/agetty-tty5/conf
importas -iu SPAWN SPAWN

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
if { pipeline { redirfd -w 2 /dev/null s6-rc -a list } grep -qFx mount-filesystems }
envfile /etc/s6/sv/agetty-tty6/conf
importas -iu SPAWN SPAWN

View File

@ -1,3 +1,3 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
if -t { test -s /etc/hostname } backtick -n -E HOSTNAME { head -1 /etc/hostname }
if -t { test -n $HOSTNAME } redirfd -w 1 /proc/sys/kernel/hostname echo $HOSTNAME

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
envfile /etc/s6/s6.conf
importas -iu HARDWARECLOCK HARDWARECLOCK
foreground { if { test $HARDWARECLOCK = UTC } hwclock --systohc --utc --noadjfile }

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
envfile /etc/s6/s6.conf
importas -iu HARDWARECLOCK HARDWARECLOCK
foreground { if { test $HARDWARECLOCK = UTC } hwclock --systz --utc --noadjfile }

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
foreground {
if -n { test -d /run/tmpfiles.d } mkdir /run/tmpfiles.d
}

View File

@ -1,2 +1,2 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
exec modules-load

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
envfile /etc/s6/s6.conf
importas -iu CGROUP_MODE CGROUP_MODE
importas -iu CGROUP_CONTROLLERS CGROUP_CONTROLLERS

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
foreground { ln -snf /proc/self/fd /dev/fd }
foreground { ln -snf /proc/self/fd/0 /dev/stdin }
foreground { ln -snf /proc/self/fd/1 /dev/stdout }

View File

@ -1,3 +1,3 @@
#!/sbin/execlineb -P
foreground { mount -a -O no_netdev }
#!/bin/execlineb -P
foreground { mount -a -t nonfs,nocifs }
foreground { if { test -x /usr/bin/zfs } zfs mount -a }

View File

@ -1,2 +1,2 @@
#!/sbin/execlineb -P
exec mount -a -O _netdev
#!/bin/execlineb -P
exec mount -a -t nfs,cifs

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
foreground {
if -n { test -e /proc/mounts }
if -n { mountpoint -q /proc } mount -t proc proc /proc -o nosuid,noexec,nodev

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
foreground {
if -n { mountpoint -q /sys }
mount -t sysfs sys /sys -o nosuid,noexec,nodev

View File

@ -1,2 +1,2 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
exec ip link set up dev lo

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
foreground { umask 077; cp /var/lib/random-seed /dev/urandom }
backtick -n bytes { cat /proc/sys/kernel/random/poolsize }
importas -iu bytes bytes

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
foreground { umask 077; cp /var/lib/random-seed /dev/urandom }
backtick -n bytes { cat /proc/sys/kernel/random/poolsize }
importas -iu bytes bytes

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
elglob -0 scripts /etc/local.d/*.stop
forx -E script { ${scripts} }
sh -c "${script}"

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
foreground { sh /etc/s6/rc.local }
elglob -0 scripts /etc/local.d/*.start
forx -E script { ${scripts} }

View File

@ -1,2 +1,2 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
exec mount -o remount,rw /

View File

@ -1,2 +1,2 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
exec swapoff -a

View File

@ -1,2 +1,2 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
exec swapon -a

View File

@ -1,2 +1,2 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
redirfd -w 1 /dev/null sysctl --system

View File

@ -1,2 +1,2 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
exec sysusers

View File

@ -1,2 +1,2 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
exec tmpfiles --prefix=/dev --create --boot

View File

@ -1,2 +1,2 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
exec tmpfiles --exclude-prefix=/dev --create --remove --boot

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
foreground { udevd --daemon }
foreground { redirfd -w 1 /dev/null udevadm trigger --action=add --type=subsystems }
foreground { redirfd -w 1 /dev/null udevadm trigger --action=add --type=devices }

View File

@ -1,4 +1,4 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
foreground { if -n -t { test -d /var/log/udevd } install -d -m 0755 -o s6log -g s6log /var/log/udevd }
envfile /etc/s6/sv/udevd-log/conf
importas -sCiu DIRECTIVES DIRECTIVES

View File

@ -1,3 +1,3 @@
#!/sbin/execlineb -P
#!/bin/execlineb -P
fdmove -c 2 1
exec udevd -D