s6-linux-init: remove tty12
This commit is contained in:
parent
58454cd0ee
commit
ddef462888
|
@ -0,0 +1,5 @@
|
|||
f52230aa6ec50164a148ae80b3f8d84ba727fd19eca38256cf8326b46cc4559643c5656b25da54395f2ce6be28b449b3e9dcaa728b12654044d85931e0f863ee rc.init
|
||||
02c5a7eed77298104224a236a45814f6b8f87f5ae07ad78acfae918fe412d7dbb9c3ecb51fb2f15b591b1b4c423bc3c43b126334dc7a8cb95fdd3c548b752742 rc.shutdown
|
||||
6180e3caf08d984387fb61a37eedd465df4fb5d8bb0294a40f5af6719d643ae7a0ecc39325b7286f9ea029122606eb046d35c0a0f4c9a9e554010ff4e4f21a4a rc.shutdown.final
|
||||
75044251af023e1eccdf046bed205d7eac2e5b698cff19ea8c16312636d15b38447e39973647d95ba17b4c04a799ed9db26a39c60709e2edc2f210ce4cc308b4 runlevel
|
||||
76376c4d407e665f67f733f1366dbacca58d268ebdbe22a9147cb102d519bd4c5887a345f66db2005d29ed9a841cb5a388c73c7d8df00d984cc4a25b9a813786 s6-linux-init-1.1.2.0.tar.gz
|
|
@ -0,0 +1,76 @@
|
|||
s6-linux-init-1.1.2.0-1
|
||||
drwxr-xr-x root/root bin/
|
||||
-rwxr-xr-x root/root bin/s6-linux-init
|
||||
-rwxr-xr-x root/root bin/s6-linux-init-echo
|
||||
-rwxr-xr-x root/root bin/s6-linux-init-hpr
|
||||
-rwxr-xr-x root/root bin/s6-linux-init-logouthookd
|
||||
-rwxr-xr-x root/root bin/s6-linux-init-maker
|
||||
-rwxr-xr-x root/root bin/s6-linux-init-nuke
|
||||
-rwxr-xr-x root/root bin/s6-linux-init-shutdown
|
||||
-rwxr-xr-x root/root bin/s6-linux-init-shutdownd
|
||||
-rwxr-xr-x root/root bin/s6-linux-init-telinit
|
||||
-rwxr-xr-x root/root bin/s6-linux-init-umountall
|
||||
drwxr-xr-x root/root etc/
|
||||
drwxr-xr-x root/root etc/s6/
|
||||
drwxr-xr-x root/root etc/s6/current/
|
||||
drwxr-xr-x root/root etc/s6/current/bin/
|
||||
-rwxr-xr-x root/root etc/s6/current/bin/halt
|
||||
-rwxr-xr-x root/root etc/s6/current/bin/init
|
||||
-rwxr-xr-x root/root etc/s6/current/bin/poweroff
|
||||
-rwxr-xr-x root/root etc/s6/current/bin/reboot
|
||||
-rwxr-xr-x root/root etc/s6/current/bin/shutdown
|
||||
-rwxr-xr-x root/root etc/s6/current/bin/telinit
|
||||
drwxr-xr-x root/root etc/s6/current/env/
|
||||
drwxr-xr-x root/root etc/s6/current/run-image/
|
||||
drwxr-xr-x root/root etc/s6/current/run-image/service/
|
||||
drwxr-xr-x root/root etc/s6/current/run-image/service/.s6-svscan/
|
||||
-rwxr-xr-x root/root etc/s6/current/run-image/service/.s6-svscan/SIGINT
|
||||
-rwxr-xr-x root/root etc/s6/current/run-image/service/.s6-svscan/SIGPWR
|
||||
-rwxr-xr-x root/root etc/s6/current/run-image/service/.s6-svscan/SIGQUIT
|
||||
-rwxr-xr-x root/root etc/s6/current/run-image/service/.s6-svscan/SIGTERM
|
||||
-rwxr-xr-x root/root etc/s6/current/run-image/service/.s6-svscan/SIGUSR1
|
||||
-rwxr-xr-x root/root etc/s6/current/run-image/service/.s6-svscan/SIGUSR2
|
||||
-rwxr-xr-x root/root etc/s6/current/run-image/service/.s6-svscan/SIGWINCH
|
||||
-rwxr-xr-x root/root etc/s6/current/run-image/service/.s6-svscan/crash
|
||||
-rwxr-xr-x root/root etc/s6/current/run-image/service/.s6-svscan/finish
|
||||
drwxr-xr-x root/root etc/s6/current/run-image/service/s6-linux-init-early-getty/
|
||||
-rwxr-xr-x root/root etc/s6/current/run-image/service/s6-linux-init-early-getty/run
|
||||
drwxr-xr-x root/root etc/s6/current/run-image/service/s6-linux-init-runleveld/
|
||||
-rw-r--r-- root/root etc/s6/current/run-image/service/s6-linux-init-runleveld/notification-fd
|
||||
-rwxr-xr-x root/root etc/s6/current/run-image/service/s6-linux-init-runleveld/run
|
||||
drwxr-xr-x root/root etc/s6/current/run-image/service/s6-linux-init-shutdownd/
|
||||
prw------- root/root etc/s6/current/run-image/service/s6-linux-init-shutdownd/fifo
|
||||
-rw-r--r-- root/root etc/s6/current/run-image/service/s6-linux-init-shutdownd/notification-fd
|
||||
-rwxr-xr-x root/root etc/s6/current/run-image/service/s6-linux-init-shutdownd/run
|
||||
drwxr-xr-x root/root etc/s6/current/run-image/service/s6-svscan-log/
|
||||
prw------- root/root etc/s6/current/run-image/service/s6-svscan-log/fifo
|
||||
-rw-r--r-- root/root etc/s6/current/run-image/service/s6-svscan-log/notification-fd
|
||||
-rwxr-xr-x root/root etc/s6/current/run-image/service/s6-svscan-log/run
|
||||
drwxr-s--- root/root etc/s6/current/run-image/uncaught-logs/
|
||||
drwxr-xr-x root/root etc/s6/current/scripts/
|
||||
-rwxr-xr-x root/root etc/s6/current/scripts/rc.init.spkgnew
|
||||
-rwxr-xr-x root/root etc/s6/current/scripts/rc.shutdown.final.spkgnew
|
||||
-rwxr-xr-x root/root etc/s6/current/scripts/rc.shutdown.spkgnew
|
||||
-rwxr-xr-x root/root etc/s6/current/scripts/runlevel.spkgnew
|
||||
drwxr-xr-x root/root etc/s6/rc/
|
||||
drwxr-xr-x root/root etc/s6/skel/
|
||||
-rwxr-xr-x root/root etc/s6/skel/rc.init
|
||||
-rwxr-xr-x root/root etc/s6/skel/rc.shutdown
|
||||
-rwxr-xr-x root/root etc/s6/skel/rc.shutdown.final
|
||||
-rwxr-xr-x root/root etc/s6/skel/runlevel
|
||||
drwxr-xr-x root/root sbin/
|
||||
lrwxrwxrwx root/root sbin/halt -> /etc/s6/current/bin/halt
|
||||
lrwxrwxrwx root/root sbin/init -> /etc/s6/current/bin/init
|
||||
lrwxrwxrwx root/root sbin/poweroff -> /etc/s6/current/bin/poweroff
|
||||
lrwxrwxrwx root/root sbin/reboot -> /etc/s6/current/bin/reboot
|
||||
lrwxrwxrwx root/root sbin/shutdown -> /etc/s6/current/bin/shutdown
|
||||
lrwxrwxrwx root/root sbin/telinit -> /etc/s6/current/bin/telinit
|
||||
drwxr-xr-x root/root usr/
|
||||
drwxr-xr-x root/root usr/include/
|
||||
drwxr-xr-x root/root usr/include/s6-linux-init/
|
||||
-rw-r--r-- root/root usr/include/s6-linux-init/config.h
|
||||
-rw-r--r-- root/root usr/include/s6-linux-init/s6-linux-init.h
|
||||
drwxr-xr-x root/root usr/lib/
|
||||
lrwxrwxrwx root/root usr/lib/libs6_linux_init.so -> libs6_linux_init.so.1.1
|
||||
lrwxrwxrwx root/root usr/lib/libs6_linux_init.so.1.1 -> libs6_linux_init.so.1.1.2.0
|
||||
-rwxr-xr-x root/root usr/lib/libs6_linux_init.so.1.1.2.0
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Add log user
|
||||
getent passwd s6log >/dev/null || useradd -M -s /sbin/nologin -d /dev/null s6log
|
||||
|
||||
# Compile service db
|
||||
s6-db-reload -r
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
SYSV="sysvinit init rc sysklogd"
|
||||
RUNIT="runit runit-rc sysklogd"
|
||||
DINIT="dinit dinit-rc"
|
||||
|
||||
for i in "$DINIT" "$RUNIT" "$SYSV" ; do
|
||||
scratch isinstalled $i && scratch remove -y $i
|
||||
done
|
|
@ -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
|
|
@ -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
|
|
@ -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.
|
|
@ -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"
|
|
@ -0,0 +1,50 @@
|
|||
# description : A tool to automate the creation of suitable stage 1 init binaries for s6-based Linux systems.
|
||||
# homepage : https://skarnet.org/software/s6-linux-init/
|
||||
# depends : s6-scripts
|
||||
|
||||
name=s6-linux-init
|
||||
version=1.1.2.0
|
||||
release=1
|
||||
backup="etc/s6/current/scripts/rc.init
|
||||
etc/s6/current/scripts/rc.shutdown
|
||||
etc/s6/current/scripts/rc.shutdown.final
|
||||
etc/s6/current/scripts/runlevel"
|
||||
source="https://skarnet.org/software/$name/$name-$version.tar.gz
|
||||
rc.init
|
||||
rc.shutdown
|
||||
rc.shutdown.final
|
||||
runlevel"
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
./configure \
|
||||
--bindir=/bin \
|
||||
--prefix=/usr \
|
||||
--libdir=/usr/lib \
|
||||
--libexecdir=/usr/lib \
|
||||
--enable-shared \
|
||||
--disable-static \
|
||||
--disable-allstatic \
|
||||
--disable-static-libc \
|
||||
--skeldir=/etc/s6/skel
|
||||
make
|
||||
make DESTDIR=$PKG install
|
||||
|
||||
# install scripts
|
||||
for i in rc.init runlevel rc.shutdown rc.shutdown.final ; do
|
||||
cp -f "$SRC/$i" "$PKG/etc/s6/skel/"
|
||||
chmod 0755 "$PKG/etc/s6/skel/$i"
|
||||
done
|
||||
|
||||
# exec s6-linux-init-maker
|
||||
./s6-linux-init-maker -1 \
|
||||
-f $PKG/etc/s6/skel \
|
||||
-p "/usr/bin:/usr/sbin:/bin:/sbin" \
|
||||
-c /etc/s6/current $PKG/etc/s6/current
|
||||
|
||||
mkdir -p -m 0755 $PKG/sbin $PKG/etc/s6/rc
|
||||
|
||||
for b in init halt poweroff reboot shutdown telinit ; do
|
||||
ln -sf /etc/s6/current/bin/$b $PKG/sbin/$b
|
||||
done
|
||||
}
|
Loading…
Reference in New Issue