Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c75de34303 | ||
![]() |
6453301c3b | ||
![]() |
454078d6a0 | ||
05801e2283 | |||
f84f50c4e9 | |||
10bdc1aa58 | |||
2b66059dbf | |||
8eec042261 | |||
8f195fc564 |
3
Makefile
3
Makefile
@@ -26,7 +26,7 @@ STAGES = \
|
|||||||
script/3 \
|
script/3 \
|
||||||
script/ctrlaltdel
|
script/ctrlaltdel
|
||||||
|
|
||||||
RCLOCAL = script/rc.local
|
RCLOCAL = script/rc.local script/rc.shutdown
|
||||||
|
|
||||||
AGETTY_CONSOLE = $(wildcard sv/agetty-console/*)
|
AGETTY_CONSOLE = $(wildcard sv/agetty-console/*)
|
||||||
AGETTY_CONSOLE_S = supervise.agetty-console
|
AGETTY_CONSOLE_S = supervise.agetty-console
|
||||||
@@ -91,6 +91,7 @@ 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
|
||||||
|
@@ -6,6 +6,7 @@ PATH=/usr/bin:/usr/sbin
|
|||||||
|
|
||||||
run_sysinit
|
run_sysinit
|
||||||
|
|
||||||
install -m100 /dev/null @RUNDIR@/stopit
|
install -m000 /dev/null @RUNDIR@/stopit
|
||||||
|
install -m000 /dev/null @RUNDIR@/reboot
|
||||||
|
|
||||||
status "Initialization complete"
|
status "Initialization complete"
|
||||||
|
@@ -10,7 +10,13 @@ for arg in $(cat /proc/cmdline); do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -x @RCDIR@/rc.local ] && @RCDIR@/rc.local
|
if [ -x @RCDIR@/rc.local ] && grep -qv '^#' @RCDIR@/rc.local; then
|
||||||
|
@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@
|
||||||
|
14
script/3.in
14
script/3.in
@@ -4,14 +4,20 @@ PATH=/usr/bin:/usr/sbin
|
|||||||
|
|
||||||
. @RCLIBDIR@/functions
|
. @RCLIBDIR@/functions
|
||||||
|
|
||||||
stat_busy "Stop services ..." sv force-stop @RUNDIR@/service/*
|
stat_busy "Stop services ..."
|
||||||
|
sv force-stop @RUNDIR@/service/*
|
||||||
stat_done
|
stat_done
|
||||||
stat_busy "Exit services ..." sv exit @RUNDIR@/service/*
|
stat_busy "Exit services ..."
|
||||||
|
sv exit @RUNDIR@/service/*
|
||||||
stat_done
|
stat_done
|
||||||
|
|
||||||
if [ -e @RUNDIR@/reboot ]; then
|
if [ -x @RCDIR@/rc.shutdown ] && grep -qv '^#' @RCDIR@/rc.shutdown; then
|
||||||
chmod 100 @RUNDIR@/reboot
|
@RCDIR@/rc.shutdown
|
||||||
|
echo "==> @RCDIR@/rc.shutdown has been depreacted. Please move the contents"
|
||||||
|
echo " of the file to @SYSCONFDIR@/rc.shutdown since the next version of"
|
||||||
|
echo " runit-artix won't read @RCDIR@/rc.shutdown anymore."
|
||||||
fi
|
fi
|
||||||
|
[ -x @SYSCONFDIR@/rc.local ] && @SYSCONFDIR@/rc.local
|
||||||
|
|
||||||
run_shutdown
|
run_shutdown
|
||||||
|
|
||||||
|
@@ -3,8 +3,11 @@
|
|||||||
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
|
||||||
touch @RUNDIR@/reboot
|
chmod 100 @RUNDIR@/reboot
|
||||||
|
|
||||||
# Proceed with shutdown process
|
# Proceed with shutdown process
|
||||||
echo "$MSG" | wall
|
echo "$MSG" | wall
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
# @RCDIR@/rc.local -- rc.local for Artix Linux
|
# @SYSCONFDIR@/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.
|
||||||
|
4
script/rc.shutdown.in
Normal file
4
script/rc.shutdown.in
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# @SYSCONFDIR@/rc.shutdown -- rc.shutdown for Artix Linux
|
||||||
|
#
|
||||||
|
# Enter your custom commands here. It will be executed on stage 3
|
||||||
|
# after stopping services.
|
Reference in New Issue
Block a user