Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
c2007499ce |
5
Makefile
5
Makefile
@@ -91,7 +91,6 @@ 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
|
||||
@@ -118,8 +117,8 @@ install-runit:
|
||||
$(LN) $(RUNDIR)/reboot $(DESTDIR)$(RUNITDIR)/
|
||||
$(LN) $(RUNDIR)/stopit $(DESTDIR)$(RUNITDIR)/
|
||||
|
||||
install -d $(DESTDIR)$(SYSCONFDIR)
|
||||
install -m755 $(RCLOCAL) $(DESTDIR)$(SYSCONFDIR)
|
||||
install -d $(DESTDIR)$(RCDIR)
|
||||
install -m755 $(RCLOCAL) $(DESTDIR)$(RCDIR)
|
||||
|
||||
install -d $(DESTDIR)$(BINDIR)
|
||||
install -m755 $(BIN) $(DESTDIR)$(BINDIR)
|
||||
|
@@ -6,7 +6,6 @@ PATH=/usr/bin:/usr/sbin
|
||||
|
||||
run_sysinit
|
||||
|
||||
install -m000 /dev/null @RUNDIR@/stopit
|
||||
install -m000 /dev/null @RUNDIR@/reboot
|
||||
install -m100 /dev/null @RUNDIR@/stopit
|
||||
|
||||
status "Initialization complete"
|
||||
msg_ok "Initialization complete"
|
||||
|
@@ -10,13 +10,7 @@ for arg in $(cat /proc/cmdline); do
|
||||
fi
|
||||
done
|
||||
|
||||
[ -x @SYSCONFDIR@/rc.local ] && @SYSCONFDIR@/rc.local
|
||||
|
||||
# OpenRC compatibility
|
||||
for script in /etc/local.d/*.start; do
|
||||
[ -x "$script" ] && "$script"
|
||||
done
|
||||
|
||||
[ -x @RCDIR@/rc.local ] && @RCDIR@/rc.local
|
||||
runsvchdir "${runlevel}"
|
||||
|
||||
ln -s @RUNSVDIR@/current @SERVICEDIR@
|
||||
|
17
script/3.in
17
script/3.in
@@ -4,19 +4,16 @@ 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
|
||||
|
||||
# OpenRC compatibility
|
||||
for script in /etc/local.d/*.stop; do
|
||||
[ -x "$script" ] && "$script"
|
||||
done
|
||||
[ -x @RCDIR@/rc.shutdown ] && @RCDIR@/rc.shutdown
|
||||
|
||||
[ -x @SYSCONFDIR@/rc.shutdown ] && @SYSCONFDIR@/rc.shutdown
|
||||
if [ -e @RUNDIR@/reboot ]; then
|
||||
chmod 100 @RUNDIR@/reboot
|
||||
fi
|
||||
|
||||
run_shutdown
|
||||
|
||||
@@ -24,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."
|
||||
|
@@ -3,11 +3,8 @@
|
||||
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
|
||||
chmod 100 @RUNDIR@/reboot
|
||||
touch @RUNDIR@/reboot
|
||||
|
||||
# Proceed with shutdown process
|
||||
echo "$MSG" | wall
|
||||
|
@@ -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
|
||||
# before running services.
|
||||
|
@@ -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
|
||||
# after stopping services.
|
||||
|
3
sv/artix-oneshot-rc/README
Normal file
3
sv/artix-oneshot-rc/README
Normal 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
3
sv/artix-oneshot-rc/finish
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
. /usr/lib/rc/functions
|
||||
stop_oneshot_services
|
4
sv/artix-oneshot-rc/run
Executable file
4
sv/artix-oneshot-rc/run
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
. /usr/lib/rc/functions
|
||||
run_oneshot_services
|
||||
exec chpst -b artix-oneshot pause
|
Reference in New Issue
Block a user