Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
397b46ff3f | |||
ee63bf4a06 | |||
bcd456603b | |||
![]() |
c75de34303 | ||
![]() |
6453301c3b | ||
![]() |
454078d6a0 | ||
05801e2283 | |||
f84f50c4e9 | |||
10bdc1aa58 | |||
2b66059dbf |
5
Makefile
5
Makefile
@@ -91,6 +91,7 @@ EDIT = sed \
|
||||
-e "s|@SERVICEDIR[@]|$(SERVICEDIR)|g" \
|
||||
-e "s|@RUNSVDIR[@]|$(RUNSVDIR)|g" \
|
||||
-e "s|@RUNDIR[@]|$(RUNDIR)|g" \
|
||||
-e "s|@SYSCONFDIR[@]|$(SYSCONFDIR)|g" \
|
||||
-e "s|@RCLIBDIR[@]|$(RCLIBDIR)|g"
|
||||
|
||||
%: %.in Makefile
|
||||
@@ -117,8 +118,8 @@ install-runit:
|
||||
$(LN) $(RUNDIR)/reboot $(DESTDIR)$(RUNITDIR)/
|
||||
$(LN) $(RUNDIR)/stopit $(DESTDIR)$(RUNITDIR)/
|
||||
|
||||
install -d $(DESTDIR)$(RCDIR)
|
||||
install -m755 $(RCLOCAL) $(DESTDIR)$(RCDIR)
|
||||
install -d $(DESTDIR)$(SYSCONFDIR)
|
||||
install -m755 $(RCLOCAL) $(DESTDIR)$(SYSCONFDIR)
|
||||
|
||||
install -d $(DESTDIR)$(BINDIR)
|
||||
install -m755 $(BIN) $(DESTDIR)$(BINDIR)
|
||||
|
@@ -6,6 +6,7 @@ PATH=/usr/bin:/usr/sbin
|
||||
|
||||
run_sysinit
|
||||
|
||||
install -m100 /dev/null @RUNDIR@/stopit
|
||||
install -m000 /dev/null @RUNDIR@/stopit
|
||||
install -m000 /dev/null @RUNDIR@/reboot
|
||||
|
||||
msg_ok "Initialization complete"
|
||||
status "Initialization complete"
|
||||
|
@@ -10,7 +10,13 @@ for arg in $(cat /proc/cmdline); do
|
||||
fi
|
||||
done
|
||||
|
||||
[ -x @RCDIR@/rc.local ] && @RCDIR@/rc.local
|
||||
[ -x @SYSCONFDIR@/rc.local ] && @SYSCONFDIR@/rc.local
|
||||
|
||||
# OpenRC compatibility
|
||||
for script in /etc/local.d/*.start; do
|
||||
[ -x "$script" ] && "$script"
|
||||
done
|
||||
|
||||
runsvchdir "${runlevel}"
|
||||
|
||||
ln -s @RUNSVDIR@/current @SERVICEDIR@
|
||||
|
17
script/3.in
17
script/3.in
@@ -4,16 +4,19 @@ PATH=/usr/bin:/usr/sbin
|
||||
|
||||
. @RCLIBDIR@/functions
|
||||
|
||||
msg "Stopping services"
|
||||
stat_busy "Stop services ..."
|
||||
sv force-stop @RUNDIR@/service/*
|
||||
msg "Exiting services"
|
||||
stat_done
|
||||
stat_busy "Exit services ..."
|
||||
sv exit @RUNDIR@/service/*
|
||||
stat_done
|
||||
|
||||
[ -x @RCDIR@/rc.shutdown ] && @RCDIR@/rc.shutdown
|
||||
# OpenRC compatibility
|
||||
for script in /etc/local.d/*.stop; do
|
||||
[ -x "$script" ] && "$script"
|
||||
done
|
||||
|
||||
if [ -e @RUNDIR@/reboot ]; then
|
||||
chmod 100 @RUNDIR@/reboot
|
||||
fi
|
||||
[ -x @SYSCONFDIR@/rc.shutdown ] && @SYSCONFDIR@/rc.shutdown
|
||||
|
||||
run_shutdown
|
||||
|
||||
@@ -21,4 +24,4 @@ if [ -e @RUNDIR@/reboot ]; then
|
||||
[[ -x $(type -P kexec) ]] && kexec -e &>/dev/null
|
||||
fi
|
||||
|
||||
msg_ok "Stage 3 completed."
|
||||
status "Stage 3 completed."
|
||||
|
@@ -3,8 +3,11 @@
|
||||
PATH=/usr/bin:/usr/sbin
|
||||
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
|
||||
touch @RUNDIR@/reboot
|
||||
chmod 100 @RUNDIR@/reboot
|
||||
|
||||
# Proceed with shutdown process
|
||||
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
|
||||
# before running services.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# @RCDIR@/rc.shutdown -- rc.shutdown for Artix Linux
|
||||
# @SYSCONFDIR@/rc.shutdown -- rc.shutdown for Artix Linux
|
||||
#
|
||||
# Enter your custom commands here. It will be executed on stage 3
|
||||
# after stopping services.
|
||||
|
@@ -1,3 +0,0 @@
|
||||
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".
|
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
. /usr/lib/rc/functions
|
||||
stop_oneshot_services
|
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
. /usr/lib/rc/functions
|
||||
run_oneshot_services
|
||||
exec chpst -b artix-oneshot pause
|
Reference in New Issue
Block a user