2 Commits

7 changed files with 21 additions and 7 deletions

View File

@@ -26,7 +26,7 @@ STAGES = \
script/3 \
script/ctrlaltdel
RCLOCAL = script/rc.local
RCLOCAL = script/rc.local script/rc.shutdown
AGETTY_CONSOLE = $(wildcard sv/agetty-console/*)
AGETTY_CONSOLE_S = supervise.agetty-console

View File

@@ -8,4 +8,4 @@ run_sysinit
install -m100 /dev/null @RUNDIR@/stopit
status "Initialization complete"
msg_ok "Initialization complete"

View File

@@ -4,12 +4,12 @@ PATH=/usr/bin:/usr/sbin
. @RCLIBDIR@/functions
stat_busy "Stop services ..."
msg "Stopping services"
sv force-stop @RUNDIR@/service/*
stat_done
stat_busy "Exit services ..."
msg "Exiting services"
sv exit @RUNDIR@/service/*
stat_done
[ -x @RCDIR@/rc.shutdown ] && @RCDIR@/rc.shutdown
if [ -e @RUNDIR@/reboot ]; then
chmod 100 @RUNDIR@/reboot
@@ -21,4 +21,4 @@ if [ -e @RUNDIR@/reboot ]; then
[[ -x $(type -P kexec) ]] && kexec -e &>/dev/null
fi
status "Stage 3 completed."
msg_ok "Stage 3 completed."

4
script/rc.shutdown.in Normal file
View File

@@ -0,0 +1,4 @@
# @RCDIR@/rc.shutdown -- rc.shutdown for Artix Linux
#
# Enter your custom commands here. It will be executed on stage 3
# after stopping services.

View File

@@ -0,0 +1,3 @@
This service is a one-time script to make sure enabled one-shot/rc
services in Artix can be run automatically on boot. For list of enabled
rc services, run "service list rc".

3
sv/artix-oneshot-rc/finish Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
. /usr/lib/rc/functions
stop_oneshot_services

4
sv/artix-oneshot-rc/run Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
. /usr/lib/rc/functions
run_oneshot_services
exec chpst -b artix-oneshot pause