diff options
author | Cem Keylan <cem@ckyln.com> | 2020-02-07 17:34:55 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-02-07 17:34:55 +0300 |
commit | 23055b3d7da4bfef00d302e91b87fa36f6f9be96 (patch) | |
tree | 27ccbaa55473bacd1d48c17de841584fb2c12fca /core/sinit/files | |
parent | c416432b8cc934b768a19242b976c159f07a22a5 (diff) | |
download | repository-23055b3d7da4bfef00d302e91b87fa36f6f9be96.tar.gz |
sinit: add changes
* Use official sources
* Switch to 1.0
* Remove the ubase dependency
* Use kpow by Dylan Araps for shutdown
Diffstat (limited to 'core/sinit/files')
-rw-r--r-- | core/sinit/files/poweroff | 1 | ||||
-rw-r--r-- | core/sinit/files/sinit-launch-services.boot | 20 | ||||
-rw-r--r-- | core/sinit/files/sinit.post.shutdown | 17 |
3 files changed, 9 insertions, 29 deletions
diff --git a/core/sinit/files/poweroff b/core/sinit/files/poweroff index 69e8f9a4..69d8731e 100644 --- a/core/sinit/files/poweroff +++ b/core/sinit/files/poweroff @@ -1,3 +1,2 @@ #!/bin/sh - /bin/kill -s USR1 1 diff --git a/core/sinit/files/sinit-launch-services.boot b/core/sinit/files/sinit-launch-services.boot index 4cbb0570..6ba14057 100644 --- a/core/sinit/files/sinit-launch-services.boot +++ b/core/sinit/files/sinit-launch-services.boot @@ -1,14 +1,10 @@ -# we are going to start runit and getty here +# We are going to start runit and getty here -sinit_run_getty() { - for getty in 1 2 3 4 5 6; do - respawn /sbin/getty 38400 tty${getty} 2>&1 & - done -} +# Uncomment to enable gettys +# for getty in 1 2 3 4 5 6 ; do +# while :; do /sbin/getty tty${getty} 0 linux ; done & # busybox getty +# # while :; do /sbin/getty tty${getty} linux ; done & # ubase getty +# done -sinit_runit() { - respawn /usr/bin/runsvdir -P /var/service & -} - -[ "$SINIT_ENABLE_GETTY" = 1 ] && sinit_run_getty -[ "$SINIT_ENABLE_RUNIT" = 1 ] && sinit_runit +# Uncomment enable runit services +# while :; do /usr/bin/runsvdir -P /var/service ; done & diff --git a/core/sinit/files/sinit.post.shutdown b/core/sinit/files/sinit.post.shutdown index 4f3c793b..5ce4d8ec 100644 --- a/core/sinit/files/sinit.post.shutdown +++ b/core/sinit/files/sinit.post.shutdown @@ -1,16 +1 @@ -# vim:filetype=sh - -# We handle the shutdown from here - -if [ "$SINIT_SHUTDOWN_HOOKS" = 1 ]; then - case "$1" in - reboot) - out "Requesting system reboot..." - halt -r - ;; - *) - out "Requesting system poweroff..." - halt -p - ;; - esac -fi +case "$1" in reboot) kpow r ;; poweroff) kpow p ;; esac |