1 Commits

10 changed files with 23 additions and 28 deletions

View File

@@ -91,7 +91,6 @@ EDIT = sed \
-e "s|@SERVICEDIR[@]|$(SERVICEDIR)|g" \ -e "s|@SERVICEDIR[@]|$(SERVICEDIR)|g" \
-e "s|@RUNSVDIR[@]|$(RUNSVDIR)|g" \ -e "s|@RUNSVDIR[@]|$(RUNSVDIR)|g" \
-e "s|@RUNDIR[@]|$(RUNDIR)|g" \ -e "s|@RUNDIR[@]|$(RUNDIR)|g" \
-e "s|@SYSCONFDIR[@]|$(SYSCONFDIR)|g" \
-e "s|@RCLIBDIR[@]|$(RCLIBDIR)|g" -e "s|@RCLIBDIR[@]|$(RCLIBDIR)|g"
%: %.in Makefile %: %.in Makefile

View File

@@ -6,7 +6,6 @@ PATH=/usr/bin:/usr/sbin
run_sysinit run_sysinit
install -m000 /dev/null @RUNDIR@/stopit install -m100 /dev/null @RUNDIR@/stopit
install -m000 /dev/null @RUNDIR@/reboot
status "Initialization complete" msg_ok "Initialization complete"

View File

@@ -10,13 +10,7 @@ for arg in $(cat /proc/cmdline); do
fi fi
done done
if [ -x @RCDIR@/rc.local ] && grep -qv '^#' @RCDIR@/rc.local; then [ -x @RCDIR@/rc.local ] && @RCDIR@/rc.local
@RCDIR@/rc.local
echo "==> @RCDIR@/rc.local has been deprecated. Please move the contents"
echo " of the file to @SYSCONFDIR@/rc.local, since the next version of"
echo " runit-artix won't read @RCDIR@/rc.local anymore."
fi
[ -x @SYSCONFDIR@/rc.local ] && @SYSCONFDIR@/rc.local
runsvchdir "${runlevel}" runsvchdir "${runlevel}"
ln -s @RUNSVDIR@/current @SERVICEDIR@ ln -s @RUNSVDIR@/current @SERVICEDIR@

View File

@@ -4,20 +4,16 @@ PATH=/usr/bin:/usr/sbin
. @RCLIBDIR@/functions . @RCLIBDIR@/functions
stat_busy "Stop services ..." msg "Stopping services"
sv force-stop @RUNDIR@/service/* sv force-stop @RUNDIR@/service/*
stat_done msg "Exiting services"
stat_busy "Exit services ..."
sv exit @RUNDIR@/service/* sv exit @RUNDIR@/service/*
stat_done
if [ -x @RCDIR@/rc.shutdown ] && grep -qv '^#' @RCDIR@/rc.shutdown; then [ -x @RCDIR@/rc.shutdown ] && @RCDIR@/rc.shutdown
@RCDIR@/rc.shutdown
echo "==> @RCDIR@/rc.shutdown has been depreacted. Please move the contents" if [ -e @RUNDIR@/reboot ]; then
echo " of the file to @SYSCONFDIR@/rc.shutdown since the next version of" chmod 100 @RUNDIR@/reboot
echo " runit-artix won't read @RCDIR@/rc.shutdown anymore."
fi fi
[ -x @SYSCONFDIR@/rc.local ] && @SYSCONFDIR@/rc.local
run_shutdown run_shutdown
@@ -25,4 +21,4 @@ if [ -e @RUNDIR@/reboot ]; then
[[ -x $(type -P kexec) ]] && kexec -e &>/dev/null [[ -x $(type -P kexec) ]] && kexec -e &>/dev/null
fi fi
status "Stage 3 completed." msg_ok "Stage 3 completed."

View File

@@ -3,11 +3,8 @@
PATH=/usr/bin:/usr/sbin PATH=/usr/bin:/usr/sbin
MSG="System is going down..." MSG="System is going down..."
# We check for this file after receiving a SIGCONT to move to stage3
chmod 100 @RUNDIR@/stopit
# We check for this file in stage3 to halt or reboot # We check for this file in stage3 to halt or reboot
chmod 100 @RUNDIR@/reboot touch @RUNDIR@/reboot
# Proceed with shutdown process # Proceed with shutdown process
echo "$MSG" | wall echo "$MSG" | wall

View File

@@ -1,4 +1,4 @@
# @SYSCONFDIR@/rc.local -- rc.local for Artix Linux # @RCDIR@/rc.local -- rc.local for Artix Linux
# #
# Enter your custom commands here. It will be executed on stage 2 # Enter your custom commands here. It will be executed on stage 2
# before running services. # before running services.

View File

@@ -1,4 +1,4 @@
# @SYSCONFDIR@/rc.shutdown -- rc.shutdown for Artix Linux # @RCDIR@/rc.shutdown -- rc.shutdown for Artix Linux
# #
# Enter your custom commands here. It will be executed on stage 3 # Enter your custom commands here. It will be executed on stage 3
# after stopping services. # 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