Numerous changes to toolchain optional packages and world default packages
bin/head - accept -[num] style arguments usr.bin/uname - alias -o to -s
This commit is contained in:
parent
7fa225e680
commit
61db92519f
180 changed files with 1239 additions and 45 deletions
|
@ -40,20 +40,20 @@ subdirs += gdbm
|
|||
subdirs += pcre
|
||||
subdirs += zsh
|
||||
subdirs += inetutils
|
||||
subdirs += perl
|
||||
#subdirs += perl
|
||||
subdirs += autoconf
|
||||
subdirs += automake
|
||||
subdirs += gperf
|
||||
subdirs += expat
|
||||
#subdirs += xml-parser
|
||||
subdirs += intltool
|
||||
#subdirs += intltool
|
||||
subdirs += kmod
|
||||
subdirs += gettext
|
||||
subdirs += elfutils
|
||||
subdirs += libffi
|
||||
subdirs += libressl
|
||||
subdirs += wget
|
||||
subdirs += python
|
||||
#subdirs += python
|
||||
#subdirs += ninja
|
||||
#subdirs += meson
|
||||
subdirs += findutils
|
||||
|
@ -75,16 +75,22 @@ subdirs += execline
|
|||
subdirs += s6
|
||||
subdirs += s6-rc
|
||||
subdirs += s6-linux-init
|
||||
#subdirs += udev-lfs
|
||||
subdirs += s6-scripts
|
||||
subdirs += udev-lfs
|
||||
subdirs += bin
|
||||
subdirs += sbin
|
||||
subdirs += usr.bin
|
||||
subdirs += usr.sbin
|
||||
subdirs += $(kernel)
|
||||
|
||||
ifeq ($(arch),x86,64)
|
||||
#subdirs += grub
|
||||
ifeq ($(arch),x86_64)
|
||||
subdirs += grub
|
||||
else ifeq ($(arch),aarch64)
|
||||
ifeq ($(rpi),1)
|
||||
subdirs += u-boot-rpi64
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(_dhcpcd),1)
|
||||
subdirs += dhcpcd
|
||||
endif
|
||||
|
|
7
world/bin/env/Makefile
vendored
7
world/bin/env/Makefile
vendored
|
@ -1,6 +1,11 @@
|
|||
# Makefile - hhl - /usr/src/world/bin/env
|
||||
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
|
||||
#
|
||||
#
|
||||
progname = env
|
||||
onestage = true
|
||||
include hhl.cprog.openbsd.mk
|
||||
|
||||
install: | $(DESTDIR)/usr/bin/env
|
||||
|
||||
$(DESTDIR)/usr/bin/env:
|
||||
ln -s ../../bin/env $@
|
||||
|
|
|
@ -26,9 +26,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE // getline, getopt
|
||||
#define _GNU_SOURCE // getline, getopt
|
||||
|
||||
#include <ctype.h> // isprint
|
||||
#include <err.h> // err
|
||||
#include <inttypes.h> // uint*_t
|
||||
#include <libgen.h> // basename
|
||||
#include <stdio.h> // fclose, fopen, getline, nread, perror, printf
|
||||
|
@ -36,16 +37,15 @@
|
|||
#include <string.h> // strcmp
|
||||
#include <unistd.h> // getopt
|
||||
|
||||
uint8_t cflag = 0, qflag = 0, vflag = 0;
|
||||
int lines = 10, j = 0;
|
||||
uint8_t cflag = 0, nflag = 0, qflag = 0, vflag = 0;
|
||||
int lines = 10, j = 0, chars = 0;
|
||||
static const char *__progname;
|
||||
|
||||
static void usage() {
|
||||
fprintf(stderr,
|
||||
"Usage: %s [-hcqv] [-n number] [FILE]...\n", __progname);
|
||||
fprintf(stderr, "Usage: %s [-hqv] [-c count] [-n lines] [FILE]...\n", __progname);
|
||||
}
|
||||
|
||||
void _head(char * file) {
|
||||
void _head(char *file) {
|
||||
FILE *fp;
|
||||
char *line = NULL;
|
||||
size_t len = 0;
|
||||
|
@ -65,11 +65,11 @@ void _head(char * file) {
|
|||
else
|
||||
printf("==> %s <==\n", file);
|
||||
}
|
||||
if (cflag) {
|
||||
if (cflag && !nflag) {
|
||||
while (!feof(fp)) {
|
||||
putchar(fgetc(fp));
|
||||
i++;
|
||||
if (i>= lines)
|
||||
if (i >= chars)
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
@ -83,7 +83,7 @@ void _head(char * file) {
|
|||
}
|
||||
if (strcmp(file, "-") != 0) {
|
||||
fclose(fp);
|
||||
j = 1;
|
||||
j = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,10 +91,25 @@ int main(int argc, char *argv[]) {
|
|||
int c, index;
|
||||
__progname = basename(argv[0]);
|
||||
|
||||
while ((c = getopt(argc, argv, "chqvn:")) != -1)
|
||||
/* Handle the old school -[0-9] style options */
|
||||
if ((argv[1])[0] == '-' && isdigit((argv[1])[1])) {
|
||||
char *x;
|
||||
x = argv[1] + 1;
|
||||
int i;
|
||||
for (i = 0; i < sizeof(argv[1]); i++) {
|
||||
if (!isdigit(x[i])) {
|
||||
x[i] = '\0';
|
||||
break;
|
||||
}
|
||||
}
|
||||
lines = (int)strtol(x, NULL, 10);
|
||||
}
|
||||
|
||||
while ((c = getopt(argc, argv, "c:hqvn:0123456789")) != -1)
|
||||
switch (c) {
|
||||
case 'c':
|
||||
cflag = 1;
|
||||
chars = (int)strtol(optarg, NULL, 10);
|
||||
break;
|
||||
case 'q':
|
||||
qflag = 1;
|
||||
|
@ -108,7 +123,19 @@ int main(int argc, char *argv[]) {
|
|||
usage();
|
||||
exit(EXIT_SUCCESS);
|
||||
case 'n':
|
||||
lines = strtol(optarg, NULL, 10);
|
||||
nflag = 1;
|
||||
lines = (int)strtol(optarg, NULL, 10);
|
||||
break;
|
||||
case '0':
|
||||
case '1':
|
||||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
|
@ -117,7 +144,7 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
if (argv[optind] == NULL)
|
||||
_head("-");
|
||||
|
||||
|
||||
if (argv[optind + 1] != NULL && (!qflag))
|
||||
vflag = 1;
|
||||
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
# Makefile - hhl - /usr/src/world/binutils
|
||||
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
|
||||
#
|
||||
#
|
||||
distname = binutils
|
||||
include world.mk
|
||||
|
||||
install_cmd = $(MAKE) DESTDIR=$(DESTDIR) -C $(objdir) install || true
|
||||
|
||||
config_opts += --host=$(tgt)
|
||||
config_opts += --target=$(tgt)
|
||||
config_opts += --with-build-sysroot=$(DESTDIR)
|
||||
|
|
|
@ -18,6 +18,5 @@ fi
|
|||
if [ -x /usr/pkg/share/info ]
|
||||
then INFOPATH=/usr/pkg/share/info:${INFOPATH}
|
||||
fi
|
||||
PKG_PATH=https://hitchhiker-linux.org/pub/${OS_VERSION}/${arch}/packages
|
||||
export PATH PKG_CONFIG_PATH MANPATH INFOPATH PKG_PATH
|
||||
export PATH PKG_CONFIG_PATH MANPATH INFOPATH
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Makefile - hhl - /usr/src/world/grub
|
||||
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
|
||||
#
|
||||
#
|
||||
distname = grub
|
||||
include world.mk
|
||||
|
||||
|
@ -9,6 +9,6 @@ config_opts += --sysconfdir=/etc
|
|||
config_opts += --disable-efiemu
|
||||
config_opts += --disable-werror
|
||||
|
||||
post_install = mv -v /etc/bash_completion.d/grub /usr/share/bash-completion/completions
|
||||
post_install = mv -v $(DESTDIR)/etc/bash_completion.d/grub $(DESTDIR)/usr/share/bash-completion/completions
|
||||
|
||||
include targets.mk
|
||||
|
|
Binary file not shown.
5
world/modules-load/Makefile
Normal file
5
world/modules-load/Makefile
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Makefile - hhl - /src/world/bin/s6-scripts
|
||||
# Copyright 2021 Nathan Fisher <nfisher.sr@gmail.com>
|
||||
#
|
||||
progname = modules-load
|
||||
include hhl.script.mk
|
52
world/modules-load/man/modules-load.8
Normal file
52
world/modules-load/man/modules-load.8
Normal file
|
@ -0,0 +1,52 @@
|
|||
.Dd June 1, 2016
|
||||
.Dt MODULES-LOAD 8
|
||||
.Os Linux
|
||||
.Sh NAME
|
||||
.Nm modules-load
|
||||
.Nd Configure kernel modules to load at boot
|
||||
.Sh SYNOPSIS
|
||||
.Nm modules-load
|
||||
.Op Fl nv
|
||||
.Sh DESCRIPTION
|
||||
.Nm
|
||||
reads files which contain kernel modules to load during boot from the list of
|
||||
locations below.
|
||||
.Bl -tag -width indent
|
||||
.It Fl n
|
||||
dry-run mode.
|
||||
This option does everything but actually insert or delete the modules.
|
||||
.It Fl v
|
||||
verbose mode.
|
||||
Print messages about what the program is doing.
|
||||
.El
|
||||
.Sh FILES
|
||||
Configuration files are read from the following locations:
|
||||
.Bl -tag -width indent
|
||||
.It /etc/modules-load.d/*.conf
|
||||
.It /run/modules-load.d/*.conf
|
||||
.It /usr/lib/modules-load.d/*.conf
|
||||
.El
|
||||
.Pp
|
||||
The configuration files should simply contain a list of kernel module names
|
||||
to load, separated by newlines.
|
||||
Empty lines and lines whose first non-whitespace character is # or ; are
|
||||
ignored.
|
||||
.Sh EXAMPLES
|
||||
.Pa /etc/modules-load.d/virtio-net.conf :
|
||||
.Bd -literal -offset indent
|
||||
# Load virtio-net.ko at boot
|
||||
virtio-net
|
||||
.Ed
|
||||
.Sh SEE ALSO
|
||||
.Xr modprobe 8
|
||||
.Sh HISTORY
|
||||
This program is a replacement for the
|
||||
.Nm modules-load
|
||||
utility provided by
|
||||
.Nm systemd .
|
||||
.Sh AUTHOR
|
||||
.An Leah Neukirchen ,
|
||||
.Mt leah@vuxu.org .
|
||||
.Sh LICENSE
|
||||
.Nm
|
||||
is in the public domain.
|
19
world/modules-load/src/modules-load.sh
Normal file
19
world/modules-load/src/modules-load.sh
Normal file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
# modules-load [-n] [-v] - modules-load.d(5) compatible kernel module loader
|
||||
|
||||
export PATH=/bin:/sbin
|
||||
|
||||
{
|
||||
# Parameters passed as modules-load= or rd.modules-load= in kernel command line.
|
||||
sed -nr 's/,/\n/;s/(.* |^)(rd\.)?modules-load=([^ ]*).*/\3/p' /proc/cmdline
|
||||
|
||||
# Find files /{etc,run,usr/lib}/modules-load.d/*.conf in that order.
|
||||
find -L /etc/modules-load.d /run/modules-load.d /usr/lib/modules-load.d \
|
||||
-maxdepth 1 -name '*.conf' -printf '%p %P\n' 2>/dev/null |
|
||||
# Load each basename only once.
|
||||
sort -k2 -s | uniq -f1 | cut -d' ' -f1 |
|
||||
# Read the files, output all non-empty, non-comment lines.
|
||||
tr '\012' '\0' | xargs -0 -r grep -h -v -e '^[#;]' -e '^$'
|
||||
} |
|
||||
# Call modprobe on the list of modules
|
||||
tr '\012' '\0' | xargs -0 -r modprobe -ab "$@"
|
|
@ -1,12 +1,12 @@
|
|||
# Makefile - hhl - /usr/src/world/s6-linux-init
|
||||
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
|
||||
#
|
||||
#
|
||||
distname = s6-linux-init
|
||||
distext = gz
|
||||
no_objdir = 1
|
||||
include world.mk
|
||||
export CFLAGS = --sysroot=$(DESTDIR)
|
||||
config_opts += --host=$(tgt)
|
||||
config_opts += --skeldir=/etc/s6-linux-init/skel
|
||||
config_opts += --skeldir=/etc/s6/skel
|
||||
config_opts += --with-sysdeps=$(libdir)/skalibs/sysdeps
|
||||
include targets.mk
|
||||
|
|
20
world/s6-scripts/Makefile
Normal file
20
world/s6-scripts/Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Makefile - hhl - /src/world/bin/s6-scripts
|
||||
# Copyright 2021 Nathan Fisher <nfisher.sr@gmail.com>
|
||||
#
|
||||
progname = init
|
||||
include hhl.script.mk
|
||||
|
||||
sysctl_libdir = $(DESTDIR)/usr/lib/sysctl.d
|
||||
|
||||
install: $(sysctl_libdir)/50-default.conf install_conf
|
||||
|
||||
$(sysctl_libdir)/50-default.conf: data/50-default.conf | $(sysctl_libdir)
|
||||
install -m644 $< $@
|
||||
|
||||
install_conf:
|
||||
cp -R etc $(DESTDIR)
|
||||
|
||||
$(sysctl_libdir):
|
||||
install -d $@
|
||||
|
||||
.PHONY: install_conf
|
42
world/s6-scripts/data/50-default.conf
Normal file
42
world/s6-scripts/data/50-default.conf
Normal file
|
@ -0,0 +1,42 @@
|
|||
# See sysctl.d(5) and core(5) for documentation.
|
||||
|
||||
# System Request functionality of the kernel (SYNC)
|
||||
#
|
||||
# Use kernel.sysrq = 1 to allow all keys.
|
||||
# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html for a list
|
||||
# of values and keys.
|
||||
kernel.sysrq = 16
|
||||
|
||||
# Append the PID to the core filename
|
||||
kernel.core_uses_pid = 1
|
||||
|
||||
# Source route verification
|
||||
net.ipv4.conf.default.rp_filter = 2
|
||||
-net.ipv4.conf.all.rp_filter = 1
|
||||
|
||||
# Do not accept source routing
|
||||
net.ipv4.conf.default.accept_source_route = 0
|
||||
-net.ipv4.conf.all.accept_source_route = 0
|
||||
|
||||
# Promote secondary addresses when the primary address is removed
|
||||
net.ipv4.conf.default.promote_secondaries = 1
|
||||
-net.ipv4.conf.all.promote_secondaries = 1
|
||||
|
||||
# ping(8) without CAP_NET_ADMIN and CAP_NET_RAW
|
||||
# The upper limit is set to 2^31-1. Values greater than that get rejected by
|
||||
# the kernel because of this definition in linux/include/net/ping.h:
|
||||
# #define GID_T_MAX (((gid_t)~0U) >> 1)
|
||||
# That's not so bad because values between 2^31 and 2^32-1 are reserved on
|
||||
# systemd-based systems anyway: https://systemd.io/UIDS-GIDS.html#summary
|
||||
-net.ipv4.ping_group_range = 0 2147483647
|
||||
|
||||
# Fair Queue CoDel packet scheduler to fight bufferbloat
|
||||
net.core.default_qdisc = fq_codel
|
||||
|
||||
# Enable hard and soft link protection
|
||||
fs.protected_hardlinks = 1
|
||||
fs.protected_symlinks = 1
|
||||
|
||||
# Enable regular file and FIFO protection
|
||||
fs.protected_regular = 1
|
||||
fs.protected_fifos = 1
|
3
world/s6-scripts/etc/s6/current/run-image/service/.s6-svscan/SIGINT
Executable file
3
world/s6-scripts/etc/s6/current/run-image/service/.s6-svscan/SIGINT
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/sbin/execlineb -P
|
||||
|
||||
s6-linux-init-shutdown -a -r -- now
|
3
world/s6-scripts/etc/s6/current/run-image/service/.s6-svscan/SIGPWR
Executable file
3
world/s6-scripts/etc/s6/current/run-image/service/.s6-svscan/SIGPWR
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/sbin/execlineb -P
|
||||
|
||||
s6-linux-init-shutdown -a -p -- now
|
2
world/s6-scripts/etc/s6/current/run-image/service/.s6-svscan/SIGQUIT
Executable file
2
world/s6-scripts/etc/s6/current/run-image/service/.s6-svscan/SIGQUIT
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/sbin/execlineb -P
|
||||
|
2
world/s6-scripts/etc/s6/current/run-image/service/.s6-svscan/SIGTERM
Executable file
2
world/s6-scripts/etc/s6/current/run-image/service/.s6-svscan/SIGTERM
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/sbin/execlineb -P
|
||||
|
3
world/s6-scripts/etc/s6/current/run-image/service/.s6-svscan/SIGUSR1
Executable file
3
world/s6-scripts/etc/s6/current/run-image/service/.s6-svscan/SIGUSR1
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/sbin/execlineb -P
|
||||
|
||||
s6-linux-init-shutdown -a -p -- now
|
3
world/s6-scripts/etc/s6/current/run-image/service/.s6-svscan/SIGUSR2
Executable file
3
world/s6-scripts/etc/s6/current/run-image/service/.s6-svscan/SIGUSR2
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/sbin/execlineb -P
|
||||
|
||||
s6-linux-init-shutdown -a -h -- now
|
2
world/s6-scripts/etc/s6/current/run-image/service/.s6-svscan/SIGWINCH
Executable file
2
world/s6-scripts/etc/s6/current/run-image/service/.s6-svscan/SIGWINCH
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/sbin/execlineb -P
|
||||
|
6
world/s6-scripts/etc/s6/current/run-image/service/.s6-svscan/crash
Executable file
6
world/s6-scripts/etc/s6/current/run-image/service/.s6-svscan/crash
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/sbin/execlineb -P
|
||||
|
||||
redirfd -w 2 /dev/console
|
||||
fdmove -c 1 2
|
||||
foreground { s6-linux-init-echo -- "s6-svscan crashed. Rebooting." }
|
||||
s6-linux-init-hpr -fr
|
6
world/s6-scripts/etc/s6/current/run-image/service/.s6-svscan/finish
Executable file
6
world/s6-scripts/etc/s6/current/run-image/service/.s6-svscan/finish
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/sbin/execlineb -P
|
||||
|
||||
redirfd -w 2 /dev/console
|
||||
fdmove -c 1 2
|
||||
foreground { s6-linux-init-echo -- "s6-svscan exited. Rebooting." }
|
||||
s6-linux-init-hpr -fr
|
|
@ -0,0 +1,3 @@
|
|||
#!/sbin/execlineb -P
|
||||
|
||||
/sbin/agetty -L -8 tty1 115200
|
|
@ -0,0 +1 @@
|
|||
3
|
|
@ -0,0 +1,7 @@
|
|||
#!/sbin/execlineb -P
|
||||
|
||||
fdmove -c 2 1
|
||||
fdmove 1 3
|
||||
s6-ipcserver -1 -a 0700 -c 1 -- s
|
||||
s6-sudod -dt30000 --
|
||||
"/etc/s6/current"/scripts/runlevel
|
|
@ -0,0 +1,3 @@
|
|||
#!/sbin/execlineb -P
|
||||
|
||||
s6-linux-init-shutdownd -c "/etc/s6/current" -g 3000
|
|
@ -0,0 +1 @@
|
|||
3
|
5
world/s6-scripts/etc/s6/current/run-image/service/s6-svscan-log/run
Executable file
5
world/s6-scripts/etc/s6/current/run-image/service/s6-svscan-log/run
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/sbin/execlineb -P
|
||||
|
||||
fdmove -c 1 2
|
||||
redirfd -rnb 0 fifo
|
||||
s6-log -bpd3 -- 1 t /run/uncaught-logs
|
49
world/s6-scripts/etc/s6/current/scripts/rc.init
Executable file
49
world/s6-scripts/etc/s6/current/scripts/rc.init
Executable file
|
@ -0,0 +1,49 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
rl="$1"
|
||||
shift
|
||||
|
||||
### argv now contains the arguments of the kernel command line that are
|
||||
### not of the form key=value. (The key=value arguments were stored by
|
||||
### s6-linux-init into an envdir, if instructed so via the -s option.)
|
||||
### Normally this argv remains unused because programs that need the
|
||||
### kernel command line usually read it later on from /proc/cmdline -
|
||||
### but just in case, it's available here.
|
||||
|
||||
|
||||
### 1. Early preparation
|
||||
### This is done only once at boot time.
|
||||
### Ideally, this phase should just initialize the service manager.
|
||||
|
||||
### If your services are managed by sysv-rc:
|
||||
# /etc/init.d/rcS
|
||||
|
||||
### If your services are managed by OpenRC:
|
||||
# /sbin/openrc sysinit
|
||||
# /sbin/openrc boot
|
||||
|
||||
### If your services are managed by s6-rc:
|
||||
### (replace /run/service with your scandir)
|
||||
s6-rc-init -c /etc/s6/rc/compiled /run/service
|
||||
|
||||
|
||||
### 2. Starting the wanted set of services
|
||||
### This is also called every time you change runlevels with telinit.
|
||||
### (edit the location to suit your installation)
|
||||
### By default, $rl is the string "default", unless you changed it
|
||||
### via the -D option to s6-linux-init-maker.
|
||||
### Numeric arguments from 1 to 5 on the kernel command line will
|
||||
### override the default.
|
||||
|
||||
exec /etc/s6/current/scripts/runlevel "$rl"
|
||||
|
||||
|
||||
### If this script is run in a container, then 1. and 2. above do not
|
||||
### apply and you should just call your CMD, if any, or let your
|
||||
### services run.
|
||||
### Something like this:
|
||||
|
||||
# if test -z "$*" ; then return 0 ; fi
|
||||
# $@
|
||||
# echo $? > /run/s6-linux-init-container-results/exitcode
|
||||
# halt
|
30
world/s6-scripts/etc/s6/current/scripts/rc.shutdown
Executable file
30
world/s6-scripts/etc/s6/current/scripts/rc.shutdown
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
### Things to do before hardware halt/reboot/poweroff.
|
||||
### Ideally, it should be a single call to the service manager,
|
||||
### telling it to bring all the services down.
|
||||
|
||||
### If your s6-linux-init-maker invocation was made with the -1
|
||||
### option, messages from rc.shutdown will appear on /dev/console
|
||||
### as well as be logged by the catch-all logger.
|
||||
### If your s6-linux-init-maker invocation did NOT include the -1
|
||||
### option, messages from rc.shutdown will only be logged by the
|
||||
### catch-all logger and will NOT appear on /dev/console. In order
|
||||
### to print them to /dev/console instead, you may want to
|
||||
### uncomment the following line:
|
||||
# exec >/dev/console 2>&1
|
||||
|
||||
### If your services are managed by sysv-rc:
|
||||
### also remove the K11reboot link from /etc/rc6.d to prevent
|
||||
### sysv-rc from rebooting prematurely - because sysvinit does
|
||||
### not properly separate state changes from system init/shutdown.
|
||||
# exec /etc/init.d/rc 6
|
||||
|
||||
### If your services are managed by OpenRC:
|
||||
### also remove the "killprocs" and "mount-ro" symlinks from
|
||||
### /etc/runlevels/shutdown - because OpenRC does not properly
|
||||
### separate the service manager from the shutdown manager either.
|
||||
# exec /sbin/openrc shutdown
|
||||
|
||||
### If your services are managed by s6-rc:
|
||||
exec s6-rc -bda change
|
18
world/s6-scripts/etc/s6/current/scripts/rc.shutdown.final
Executable file
18
world/s6-scripts/etc/s6/current/scripts/rc.shutdown.final
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
### Things to do *right before* the machine gets rebooted or
|
||||
### powered off, at the very end of the shutdown sequence,
|
||||
### when all the filesystems are unmounted.
|
||||
|
||||
### This is a last resort hook; normally nothing should be
|
||||
### done here (your rc.shutdown script should have taken care
|
||||
### of everything) and you should leave this script empty.
|
||||
|
||||
### Some distributions, however, may need to perform some
|
||||
### actions after unmounting the filesystems: typically if
|
||||
### an additional teardown action is required on a filesystem
|
||||
### after unmounting it, or if the system needs to be
|
||||
### pivot_rooted before it can be shut down, etc.
|
||||
|
||||
### Those are all exceptional cases. If you don't know for
|
||||
### certain that you need to do something here, you don't.
|
18
world/s6-scripts/etc/s6/current/scripts/runlevel
Executable file
18
world/s6-scripts/etc/s6/current/scripts/runlevel
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
### This script is called once at boot time by rc.init, and is
|
||||
### also called by the runleveld service every time the user
|
||||
### requests a machine state change via telinit.
|
||||
### Ideally, it should just be a call to the service manager.
|
||||
|
||||
test "$#" -gt 0 || { echo 'runlevel: fatal: too few arguments' 1>&2 ; exit 100 ; }
|
||||
|
||||
|
||||
### If your services are managed by sysv-rc:
|
||||
# exec /etc/init.d/rc "$1"
|
||||
|
||||
### If your services are managed by OpenRC:
|
||||
# exec /sbin/openrc "$1"
|
||||
|
||||
### If your services are managed by s6-rc:
|
||||
exec s6-rc -up change "$1"
|
6
world/s6-scripts/etc/s6/rc.local
Normal file
6
world/s6-scripts/etc/s6/rc.local
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Enter custom commands here. By default, they will be executed on startup with the
|
||||
# "boot" bundle before running services. If you need these commands to wait on certain
|
||||
# services being up, you can edit the /etc/s6/sv/rc-local/dependencies file and then
|
||||
# recompile the database.
|
28
world/s6-scripts/etc/s6/s6.conf
Normal file
28
world/s6-scripts/etc/s6/s6.conf
Normal file
|
@ -0,0 +1,28 @@
|
|||
# /etc/s6/s6.conf - system configuration
|
||||
|
||||
# Set HARDWARECLOCK to UTC if your Hardware Clock is set to UTC (also known as
|
||||
# Greenwich Mean Time). If that clock is set to the local time, then
|
||||
# set HARDWARECLOCK to localtime. Note that if you dual boot with Windows, then
|
||||
# you should set it to localtime.
|
||||
|
||||
HARDWARECLOCK=UTC
|
||||
|
||||
# cgroups mode
|
||||
# legacy mounts cgroups version 1 on /sys/fs/cgroup
|
||||
# unified mounts cgroups version 2 on /sys/fs/cgroup
|
||||
# hybrid mounts cgroups version 2 on /sys/fs/cgroup/unified and
|
||||
# cgroups version 1 on /sys/fs/cgroup
|
||||
|
||||
CGROUP_MODE=hybrid
|
||||
|
||||
# This is a list of controllers which should be enabled for cgroups version 2.
|
||||
# If hybrid mode is being used, controllers listed here will not be
|
||||
# available for cgroups version 1. none means no controllers will be used
|
||||
|
||||
CGROUP_CONTROLLERS=none
|
||||
|
||||
# This switch controls whether or not cgroups version 1 controllers are
|
||||
# individually mounted under
|
||||
# /sys/fs/cgroup in hybrid or legacy mode
|
||||
|
||||
HAVE_CONTROLLER1_GROUPS=true
|
49
world/s6-scripts/etc/s6/skel/rc.init
Executable file
49
world/s6-scripts/etc/s6/skel/rc.init
Executable file
|
@ -0,0 +1,49 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
rl="$1"
|
||||
shift
|
||||
|
||||
### argv now contains the arguments of the kernel command line that are
|
||||
### not of the form key=value. (The key=value arguments were stored by
|
||||
### s6-linux-init into an envdir, if instructed so via the -s option.)
|
||||
### Normally this argv remains unused because programs that need the
|
||||
### kernel command line usually read it later on from /proc/cmdline -
|
||||
### but just in case, it's available here.
|
||||
|
||||
|
||||
### 1. Early preparation
|
||||
### This is done only once at boot time.
|
||||
### Ideally, this phase should just initialize the service manager.
|
||||
|
||||
### If your services are managed by sysv-rc:
|
||||
# /etc/init.d/rcS
|
||||
|
||||
### If your services are managed by OpenRC:
|
||||
# /sbin/openrc sysinit
|
||||
# /sbin/openrc boot
|
||||
|
||||
### If your services are managed by s6-rc:
|
||||
### (replace /run/service with your scandir)
|
||||
s6-rc-init -c /etc/s6/rc/compiled /run/service
|
||||
|
||||
|
||||
### 2. Starting the wanted set of services
|
||||
### This is also called every time you change runlevels with telinit.
|
||||
### (edit the location to suit your installation)
|
||||
### By default, $rl is the string "default", unless you changed it
|
||||
### via the -D option to s6-linux-init-maker.
|
||||
### Numeric arguments from 1 to 5 on the kernel command line will
|
||||
### override the default.
|
||||
|
||||
exec /etc/s6/current/scripts/runlevel "$rl"
|
||||
|
||||
|
||||
### If this script is run in a container, then 1. and 2. above do not
|
||||
### apply and you should just call your CMD, if any, or let your
|
||||
### services run.
|
||||
### Something like this:
|
||||
|
||||
# if test -z "$*" ; then return 0 ; fi
|
||||
# $@
|
||||
# echo $? > /run/s6-linux-init-container-results/exitcode
|
||||
# halt
|
30
world/s6-scripts/etc/s6/skel/rc.shutdown
Executable file
30
world/s6-scripts/etc/s6/skel/rc.shutdown
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
### Things to do before hardware halt/reboot/poweroff.
|
||||
### Ideally, it should be a single call to the service manager,
|
||||
### telling it to bring all the services down.
|
||||
|
||||
### If your s6-linux-init-maker invocation was made with the -1
|
||||
### option, messages from rc.shutdown will appear on /dev/console
|
||||
### as well as be logged by the catch-all logger.
|
||||
### If your s6-linux-init-maker invocation did NOT include the -1
|
||||
### option, messages from rc.shutdown will only be logged by the
|
||||
### catch-all logger and will NOT appear on /dev/console. In order
|
||||
### to print them to /dev/console instead, you may want to
|
||||
### uncomment the following line:
|
||||
# exec >/dev/console 2>&1
|
||||
|
||||
### If your services are managed by sysv-rc:
|
||||
### also remove the K11reboot link from /etc/rc6.d to prevent
|
||||
### sysv-rc from rebooting prematurely - because sysvinit does
|
||||
### not properly separate state changes from system init/shutdown.
|
||||
# exec /etc/init.d/rc 6
|
||||
|
||||
### If your services are managed by OpenRC:
|
||||
### also remove the "killprocs" and "mount-ro" symlinks from
|
||||
### /etc/runlevels/shutdown - because OpenRC does not properly
|
||||
### separate the service manager from the shutdown manager either.
|
||||
# exec /sbin/openrc shutdown
|
||||
|
||||
### If your services are managed by s6-rc:
|
||||
exec s6-rc -bda change
|
18
world/s6-scripts/etc/s6/skel/rc.shutdown.final
Executable file
18
world/s6-scripts/etc/s6/skel/rc.shutdown.final
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
### Things to do *right before* the machine gets rebooted or
|
||||
### powered off, at the very end of the shutdown sequence,
|
||||
### when all the filesystems are unmounted.
|
||||
|
||||
### This is a last resort hook; normally nothing should be
|
||||
### done here (your rc.shutdown script should have taken care
|
||||
### of everything) and you should leave this script empty.
|
||||
|
||||
### Some distributions, however, may need to perform some
|
||||
### actions after unmounting the filesystems: typically if
|
||||
### an additional teardown action is required on a filesystem
|
||||
### after unmounting it, or if the system needs to be
|
||||
### pivot_rooted before it can be shut down, etc.
|
||||
|
||||
### Those are all exceptional cases. If you don't know for
|
||||
### certain that you need to do something here, you don't.
|
18
world/s6-scripts/etc/s6/skel/runlevel
Executable file
18
world/s6-scripts/etc/s6/skel/runlevel
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
### This script is called once at boot time by rc.init, and is
|
||||
### also called by the runleveld service every time the user
|
||||
### requests a machine state change via telinit.
|
||||
### Ideally, it should just be a call to the service manager.
|
||||
|
||||
test "$#" -gt 0 || { echo 'runlevel: fatal: too few arguments' 1>&2 ; exit 100 ; }
|
||||
|
||||
|
||||
### If your services are managed by sysv-rc:
|
||||
# exec /etc/init.d/rc "$1"
|
||||
|
||||
### If your services are managed by OpenRC:
|
||||
# exec /sbin/openrc "$1"
|
||||
|
||||
### If your services are managed by s6-rc:
|
||||
exec s6-rc -up change "$1"
|
5
world/s6-scripts/etc/s6/sv/agetty-tty1/conf
Normal file
5
world/s6-scripts/etc/s6/sv/agetty-tty1/conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Option to actually spawn the getty when the service starts. Set to "yes" to enable.
|
||||
SPAWN="yes"
|
||||
|
||||
# User to autologin as. Leave blank to disable.
|
||||
USER=""
|
1
world/s6-scripts/etc/s6/sv/agetty-tty1/dependencies
Normal file
1
world/s6-scripts/etc/s6/sv/agetty-tty1/dependencies
Normal file
|
@ -0,0 +1 @@
|
|||
hostname
|
8
world/s6-scripts/etc/s6/sv/agetty-tty1/run
Normal file
8
world/s6-scripts/etc/s6/sv/agetty-tty1/run
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/sbin/execlineb -P
|
||||
if { pipeline { redirfd -w 2 /dev/null s6-rc -a list } grep -qFx mount-filesystems }
|
||||
envfile /etc/s6/sv/agetty-tty1/conf
|
||||
importas -iu SPAWN SPAWN
|
||||
importas -iu USER USER
|
||||
if -t { test ${SPAWN} = "yes" }
|
||||
ifelse -X { test ${USER} = "" }
|
||||
{ exec agetty -L -8 tty1 115200 } exec agetty -L -8 tty1 115200 -a ${USER}
|
1
world/s6-scripts/etc/s6/sv/agetty-tty1/type
Normal file
1
world/s6-scripts/etc/s6/sv/agetty-tty1/type
Normal file
|
@ -0,0 +1 @@
|
|||
longrun
|
5
world/s6-scripts/etc/s6/sv/agetty-tty2/conf
Normal file
5
world/s6-scripts/etc/s6/sv/agetty-tty2/conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Option to actually spawn the getty when the service starts. Set to "yes" to enable.
|
||||
SPAWN="yes"
|
||||
|
||||
# User to autologin as. Leave blank to disable.
|
||||
USER=""
|
1
world/s6-scripts/etc/s6/sv/agetty-tty2/dependencies
Normal file
1
world/s6-scripts/etc/s6/sv/agetty-tty2/dependencies
Normal file
|
@ -0,0 +1 @@
|
|||
hostname
|
8
world/s6-scripts/etc/s6/sv/agetty-tty2/run
Normal file
8
world/s6-scripts/etc/s6/sv/agetty-tty2/run
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/sbin/execlineb -P
|
||||
if { pipeline { redirfd -w 2 /dev/null s6-rc -a list } grep -qFx mount-filesystems }
|
||||
envfile /etc/s6/sv/agetty-tty2/conf
|
||||
importas -iu SPAWN SPAWN
|
||||
importas -iu USER USER
|
||||
if -t { test ${SPAWN} = "yes" }
|
||||
ifelse -X { test ${USER} = "" }
|
||||
{ exec agetty -L -8 tty2 115200 } exec agetty -L -8 tty2 115200 -a ${USER}
|
1
world/s6-scripts/etc/s6/sv/agetty-tty2/type
Normal file
1
world/s6-scripts/etc/s6/sv/agetty-tty2/type
Normal file
|
@ -0,0 +1 @@
|
|||
longrun
|
5
world/s6-scripts/etc/s6/sv/agetty-tty3/conf
Normal file
5
world/s6-scripts/etc/s6/sv/agetty-tty3/conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Option to actually spawn the getty when the service starts. Set to "yes" to enable.
|
||||
SPAWN="yes"
|
||||
|
||||
# User to autologin as. Leave blank to disable.
|
||||
USER=""
|
1
world/s6-scripts/etc/s6/sv/agetty-tty3/dependencies
Normal file
1
world/s6-scripts/etc/s6/sv/agetty-tty3/dependencies
Normal file
|
@ -0,0 +1 @@
|
|||
hostname
|
8
world/s6-scripts/etc/s6/sv/agetty-tty3/run
Normal file
8
world/s6-scripts/etc/s6/sv/agetty-tty3/run
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/sbin/execlineb -P
|
||||
if { pipeline { redirfd -w 2 /dev/null s6-rc -a list } grep -qFx mount-filesystems }
|
||||
envfile /etc/s6/sv/agetty-tty3/conf
|
||||
importas -iu SPAWN SPAWN
|
||||
importas -iu USER USER
|
||||
if -t { test ${SPAWN} = "yes" }
|
||||
ifelse -X { test ${USER} = "" }
|
||||
{ exec agetty -L -8 tty3 115200 } exec agetty -L -8 tty3 115200 -a ${USER}
|
1
world/s6-scripts/etc/s6/sv/agetty-tty3/type
Normal file
1
world/s6-scripts/etc/s6/sv/agetty-tty3/type
Normal file
|
@ -0,0 +1 @@
|
|||
longrun
|
5
world/s6-scripts/etc/s6/sv/agetty-tty4/conf
Normal file
5
world/s6-scripts/etc/s6/sv/agetty-tty4/conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Option to actually spawn the getty when the service starts. Set to "yes" to enable.
|
||||
SPAWN="yes"
|
||||
|
||||
# User to autologin as. Leave blank to disable.
|
||||
USER=""
|
1
world/s6-scripts/etc/s6/sv/agetty-tty4/dependencies
Normal file
1
world/s6-scripts/etc/s6/sv/agetty-tty4/dependencies
Normal file
|
@ -0,0 +1 @@
|
|||
hostname
|
8
world/s6-scripts/etc/s6/sv/agetty-tty4/run
Normal file
8
world/s6-scripts/etc/s6/sv/agetty-tty4/run
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/sbin/execlineb -P
|
||||
if { pipeline { redirfd -w 2 /dev/null s6-rc -a list } grep -qFx mount-filesystems }
|
||||
envfile /etc/s6/sv/agetty-tty4/conf
|
||||
importas -iu SPAWN SPAWN
|
||||
importas -iu USER USER
|
||||
if -t { test ${SPAWN} = "yes" }
|
||||
ifelse -X { test ${USER} = "" }
|
||||
{ exec agetty -L -8 tty4 115200 } exec agetty -L -8 tty4 115200 -a ${USER}
|
1
world/s6-scripts/etc/s6/sv/agetty-tty4/type
Normal file
1
world/s6-scripts/etc/s6/sv/agetty-tty4/type
Normal file
|
@ -0,0 +1 @@
|
|||
longrun
|
5
world/s6-scripts/etc/s6/sv/agetty-tty5/conf
Normal file
5
world/s6-scripts/etc/s6/sv/agetty-tty5/conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Option to actually spawn the getty when the service starts. Set to "yes" to enable.
|
||||
SPAWN="yes"
|
||||
|
||||
# User to autologin as. Leave blank to disable.
|
||||
USER=""
|
1
world/s6-scripts/etc/s6/sv/agetty-tty5/dependencies
Normal file
1
world/s6-scripts/etc/s6/sv/agetty-tty5/dependencies
Normal file
|
@ -0,0 +1 @@
|
|||
hostname
|
8
world/s6-scripts/etc/s6/sv/agetty-tty5/run
Normal file
8
world/s6-scripts/etc/s6/sv/agetty-tty5/run
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/sbin/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
|
||||
importas -iu USER USER
|
||||
if -t { test ${SPAWN} = "yes" }
|
||||
ifelse -X { test ${USER} = "" }
|
||||
{ exec agetty -L -8 tty5 115200 } exec agetty -L -8 tty5 115200 -a ${USER}
|
1
world/s6-scripts/etc/s6/sv/agetty-tty5/type
Normal file
1
world/s6-scripts/etc/s6/sv/agetty-tty5/type
Normal file
|
@ -0,0 +1 @@
|
|||
longrun
|
5
world/s6-scripts/etc/s6/sv/agetty-tty6/conf
Normal file
5
world/s6-scripts/etc/s6/sv/agetty-tty6/conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Option to actually spawn the getty when the service starts. Set to "yes" to enable.
|
||||
SPAWN="yes"
|
||||
|
||||
# User to autologin as. Leave blank to disable.
|
||||
USER=""
|
1
world/s6-scripts/etc/s6/sv/agetty-tty6/dependencies
Normal file
1
world/s6-scripts/etc/s6/sv/agetty-tty6/dependencies
Normal file
|
@ -0,0 +1 @@
|
|||
hostname
|
8
world/s6-scripts/etc/s6/sv/agetty-tty6/run
Normal file
8
world/s6-scripts/etc/s6/sv/agetty-tty6/run
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/sbin/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
|
||||
importas -iu USER USER
|
||||
if -t { test ${SPAWN} = "yes" }
|
||||
ifelse -X { test ${USER} = "" }
|
||||
{ exec agetty -L -8 tty6 115200 } exec agetty -L -8 tty6 115200 -a ${USER}
|
1
world/s6-scripts/etc/s6/sv/agetty-tty6/type
Normal file
1
world/s6-scripts/etc/s6/sv/agetty-tty6/type
Normal file
|
@ -0,0 +1 @@
|
|||
longrun
|
1
world/s6-scripts/etc/s6/sv/binfmt/dependencies
Normal file
1
world/s6-scripts/etc/s6/sv/binfmt/dependencies
Normal file
|
@ -0,0 +1 @@
|
|||
mount-procfs
|
15
world/s6-scripts/etc/s6/sv/binfmt/shell_up
Executable file
15
world/s6-scripts/etc/s6/sv/binfmt/shell_up
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
mountpoint -q /proc/sys/fs/binfmt_misc || \
|
||||
mount -t binfmt_misc binfmt /proc/sys/fs/binfmt_misc
|
||||
|
||||
for path in /usr/lib/binfmt.d /etc/binfmt.d /run/binfmt.d; do
|
||||
[ ! -d $path ] && continue
|
||||
[ -z "$(ls $path)" ] && continue
|
||||
grep -h "^:" $path/* | \
|
||||
while read -r line; do
|
||||
reg=${line#*:}
|
||||
[ -e /proc/sys/fs/binfmt_misc/${reg%%:*} ] && echo -1 > /proc/sys/fs/binfmt_misc/${reg%%:*}
|
||||
printf "%s" "$line" > /proc/sys/fs/binfmt_misc/register
|
||||
done
|
||||
done
|
1
world/s6-scripts/etc/s6/sv/binfmt/type
Normal file
1
world/s6-scripts/etc/s6/sv/binfmt/type
Normal file
|
@ -0,0 +1 @@
|
|||
oneshot
|
2
world/s6-scripts/etc/s6/sv/binfmt/up
Normal file
2
world/s6-scripts/etc/s6/sv/binfmt/up
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/sbin/execlineb -P
|
||||
foreground { sh /etc/s6/sv/binfmt/shell_up }
|
4
world/s6-scripts/etc/s6/sv/boot/contents
Normal file
4
world/s6-scripts/etc/s6/sv/boot/contents
Normal file
|
@ -0,0 +1,4 @@
|
|||
udev
|
||||
mount
|
||||
misc
|
||||
setup
|
1
world/s6-scripts/etc/s6/sv/boot/type
Normal file
1
world/s6-scripts/etc/s6/sv/boot/type
Normal file
|
@ -0,0 +1 @@
|
|||
bundle
|
1
world/s6-scripts/etc/s6/sv/cleanup/type
Normal file
1
world/s6-scripts/etc/s6/sv/cleanup/type
Normal file
|
@ -0,0 +1 @@
|
|||
oneshot
|
5
world/s6-scripts/etc/s6/sv/cleanup/up
Normal file
5
world/s6-scripts/etc/s6/sv/cleanup/up
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/sbin/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 }
|
||||
foreground { rm -f /etc/nologin /forcefsck /forcequotacheck /fastboot }
|
1
world/s6-scripts/etc/s6/sv/console-setup/dependencies
Normal file
1
world/s6-scripts/etc/s6/sv/console-setup/dependencies
Normal file
|
@ -0,0 +1 @@
|
|||
early-getty-down
|
16
world/s6-scripts/etc/s6/sv/console-setup/shell_up
Executable file
16
world/s6-scripts/etc/s6/sv/console-setup/shell_up
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
[ -r /etc/vconsole.conf ] && . /etc/vconsole.conf
|
||||
TTYS=${TTYS:-6}
|
||||
_index=0
|
||||
while [ ${_index} -le $TTYS ]; do
|
||||
if [ -n "$FONT" ]; then
|
||||
setfont ${FONT_MAP:+-m $FONT_MAP} ${FONT_UNIMAP:+-u $FONT_UNIMAP} \
|
||||
$FONT -C "/dev/tty${_index}"
|
||||
fi
|
||||
printf "\033%s" "%G" >/dev/tty${_index}
|
||||
_index=$((_index + 1))
|
||||
done
|
||||
if [ -n "$KEYMAP" ]; then
|
||||
loadkeys -q -u ${KEYMAP}
|
||||
fi
|
1
world/s6-scripts/etc/s6/sv/console-setup/type
Normal file
1
world/s6-scripts/etc/s6/sv/console-setup/type
Normal file
|
@ -0,0 +1 @@
|
|||
oneshot
|
2
world/s6-scripts/etc/s6/sv/console-setup/up
Normal file
2
world/s6-scripts/etc/s6/sv/console-setup/up
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/sbin/execlineb -P
|
||||
exec sh /etc/s6/sv/console-setup/shell_up
|
1
world/s6-scripts/etc/s6/sv/default/contents
Normal file
1
world/s6-scripts/etc/s6/sv/default/contents
Normal file
|
@ -0,0 +1 @@
|
|||
boot
|
1
world/s6-scripts/etc/s6/sv/default/type
Normal file
1
world/s6-scripts/etc/s6/sv/default/type
Normal file
|
@ -0,0 +1 @@
|
|||
bundle
|
2
world/s6-scripts/etc/s6/sv/dmesg/conf
Normal file
2
world/s6-scripts/etc/s6/sv/dmesg/conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
# This configures the directives used for s6-log in the log service.
|
||||
DIRECTIVES="n3 s2000000 T"
|
1
world/s6-scripts/etc/s6/sv/dmesg/dependencies
Normal file
1
world/s6-scripts/etc/s6/sv/dmesg/dependencies
Normal file
|
@ -0,0 +1 @@
|
|||
remount-root
|
1
world/s6-scripts/etc/s6/sv/dmesg/type
Normal file
1
world/s6-scripts/etc/s6/sv/dmesg/type
Normal file
|
@ -0,0 +1 @@
|
|||
oneshot
|
5
world/s6-scripts/etc/s6/sv/dmesg/up
Normal file
5
world/s6-scripts/etc/s6/sv/dmesg/up
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/sbin/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
|
||||
pipeline { dmesg } s6-setuidgid s6log exec -c s6-log -b -- ${DIRECTIVES} /var/log/dmesg
|
1
world/s6-scripts/etc/s6/sv/early-getty-down/dependencies
Normal file
1
world/s6-scripts/etc/s6/sv/early-getty-down/dependencies
Normal file
|
@ -0,0 +1 @@
|
|||
agetty-tty1
|
1
world/s6-scripts/etc/s6/sv/early-getty-down/type
Normal file
1
world/s6-scripts/etc/s6/sv/early-getty-down/type
Normal file
|
@ -0,0 +1 @@
|
|||
oneshot
|
2
world/s6-scripts/etc/s6/sv/early-getty-down/up
Normal file
2
world/s6-scripts/etc/s6/sv/early-getty-down/up
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/sbin/execlineb -P
|
||||
exec s6-svc -d /run/service/s6-linux-init-early-getty
|
6
world/s6-scripts/etc/s6/sv/getty/contents
Normal file
6
world/s6-scripts/etc/s6/sv/getty/contents
Normal file
|
@ -0,0 +1,6 @@
|
|||
agetty-tty1
|
||||
agetty-tty2
|
||||
agetty-tty3
|
||||
agetty-tty4
|
||||
agetty-tty5
|
||||
agetty-tty6
|
1
world/s6-scripts/etc/s6/sv/getty/type
Normal file
1
world/s6-scripts/etc/s6/sv/getty/type
Normal file
|
@ -0,0 +1 @@
|
|||
bundle
|
1
world/s6-scripts/etc/s6/sv/hostname/dependencies
Normal file
1
world/s6-scripts/etc/s6/sv/hostname/dependencies
Normal file
|
@ -0,0 +1 @@
|
|||
mount-procfs
|
1
world/s6-scripts/etc/s6/sv/hostname/type
Normal file
1
world/s6-scripts/etc/s6/sv/hostname/type
Normal file
|
@ -0,0 +1 @@
|
|||
oneshot
|
3
world/s6-scripts/etc/s6/sv/hostname/up
Normal file
3
world/s6-scripts/etc/s6/sv/hostname/up
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/sbin/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
|
5
world/s6-scripts/etc/s6/sv/hwclock/down
Normal file
5
world/s6-scripts/etc/s6/sv/hwclock/down
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/sbin/execlineb -P
|
||||
envfile /etc/s6/s6.conf
|
||||
importas -iu HARDWARECLOCK HARDWARECLOCK
|
||||
foreground { if { test $HARDWARECLOCK = UTC } hwclock --systohc --utc --noadjfile }
|
||||
foreground { if { test $HARDWARECLOCK = localtime } hwclock --systohc --localtime --noadjfile }
|
1
world/s6-scripts/etc/s6/sv/hwclock/type
Normal file
1
world/s6-scripts/etc/s6/sv/hwclock/type
Normal file
|
@ -0,0 +1 @@
|
|||
oneshot
|
5
world/s6-scripts/etc/s6/sv/hwclock/up
Normal file
5
world/s6-scripts/etc/s6/sv/hwclock/up
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/sbin/execlineb -P
|
||||
envfile /etc/s6/s6.conf
|
||||
importas -iu HARDWARECLOCK HARDWARECLOCK
|
||||
foreground { if { test $HARDWARECLOCK = UTC } hwclock --systz --utc --noadjfile }
|
||||
foreground { if { test $HARDWARECLOCK = localtime } hwclock --systz --localtime --noadjfile }
|
1
world/s6-scripts/etc/s6/sv/kmod-static-nodes/type
Normal file
1
world/s6-scripts/etc/s6/sv/kmod-static-nodes/type
Normal file
|
@ -0,0 +1 @@
|
|||
oneshot
|
5
world/s6-scripts/etc/s6/sv/kmod-static-nodes/up
Normal file
5
world/s6-scripts/etc/s6/sv/kmod-static-nodes/up
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/sbin/execlineb -P
|
||||
foreground {
|
||||
if -n { test -d /run/tmpfiles.d } mkdir /run/tmpfiles.d
|
||||
}
|
||||
foreground { kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf }
|
6
world/s6-scripts/etc/s6/sv/misc/contents
Normal file
6
world/s6-scripts/etc/s6/sv/misc/contents
Normal file
|
@ -0,0 +1,6 @@
|
|||
hostname
|
||||
hwclock
|
||||
modules
|
||||
kmod-static-nodes
|
||||
tmpfiles-dev
|
||||
rc-local
|
1
world/s6-scripts/etc/s6/sv/misc/type
Normal file
1
world/s6-scripts/etc/s6/sv/misc/type
Normal file
|
@ -0,0 +1 @@
|
|||
bundle
|
2
world/s6-scripts/etc/s6/sv/modules/dependencies
Normal file
2
world/s6-scripts/etc/s6/sv/modules/dependencies
Normal file
|
@ -0,0 +1,2 @@
|
|||
mount-procfs
|
||||
remount-root
|
1
world/s6-scripts/etc/s6/sv/modules/type
Normal file
1
world/s6-scripts/etc/s6/sv/modules/type
Normal file
|
@ -0,0 +1 @@
|
|||
oneshot
|
2
world/s6-scripts/etc/s6/sv/modules/up
Normal file
2
world/s6-scripts/etc/s6/sv/modules/up
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/sbin/execlineb -P
|
||||
exec modules-load
|
19
world/s6-scripts/etc/s6/sv/mount-cgroups/cgroup-release-agent.sh
Executable file
19
world/s6-scripts/etc/s6/sv/mount-cgroups/cgroup-release-agent.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
# This is run by the kernel after the last task is removed from a
|
||||
# control group in the openrc hierarchy.
|
||||
|
||||
# Copyright (c) 2007-2015 The OpenRC Authors.
|
||||
# See the Authors file at the top-level directory of this distribution and
|
||||
# https://github.com/OpenRC/openrc/blob/master/AUTHORS
|
||||
#
|
||||
# This file is part of OpenRC. It is subject to the license terms in
|
||||
# the LICENSE file found in the top-level directory of this
|
||||
# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
|
||||
# This file may not be copied, modified, propagated, or distributed
|
||||
# except according to the terms contained in the LICENSE file.
|
||||
|
||||
cgroup=/sys/fs/cgroup/openrc
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
if [ -d ${cgroup}/"$1" ]; then
|
||||
rmdir ${cgroup}/"$1"
|
||||
fi
|
1
world/s6-scripts/etc/s6/sv/mount-cgroups/dependencies
Normal file
1
world/s6-scripts/etc/s6/sv/mount-cgroups/dependencies
Normal file
|
@ -0,0 +1 @@
|
|||
mount-procfs
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue