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|@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
|
||||||
@@ -118,8 +117,8 @@ install-runit:
|
|||||||
$(LN) $(RUNDIR)/reboot $(DESTDIR)$(RUNITDIR)/
|
$(LN) $(RUNDIR)/reboot $(DESTDIR)$(RUNITDIR)/
|
||||||
$(LN) $(RUNDIR)/stopit $(DESTDIR)$(RUNITDIR)/
|
$(LN) $(RUNDIR)/stopit $(DESTDIR)$(RUNITDIR)/
|
||||||
|
|
||||||
install -d $(DESTDIR)$(SYSCONFDIR)
|
install -d $(DESTDIR)$(RCDIR)
|
||||||
install -m755 $(RCLOCAL) $(DESTDIR)$(SYSCONFDIR)
|
install -m755 $(RCLOCAL) $(DESTDIR)$(RCDIR)
|
||||||
|
|
||||||
install -d $(DESTDIR)$(BINDIR)
|
install -d $(DESTDIR)$(BINDIR)
|
||||||
install -m755 $(BIN) $(DESTDIR)$(BINDIR)
|
install -m755 $(BIN) $(DESTDIR)$(BINDIR)
|
||||||
|
@@ -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"
|
||||||
|
@@ -10,13 +10,7 @@ for arg in $(cat /proc/cmdline); do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -x @SYSCONFDIR@/rc.local ] && @SYSCONFDIR@/rc.local
|
[ -x @RCDIR@/rc.local ] && @RCDIR@/rc.local
|
||||||
|
|
||||||
# OpenRC compatibility
|
|
||||||
for script in /etc/local.d/*.start; do
|
|
||||||
[ -x "$script" ] && "$script"
|
|
||||||
done
|
|
||||||
|
|
||||||
runsvchdir "${runlevel}"
|
runsvchdir "${runlevel}"
|
||||||
|
|
||||||
ln -s @RUNSVDIR@/current @SERVICEDIR@
|
ln -s @RUNSVDIR@/current @SERVICEDIR@
|
||||||
|
17
script/3.in
17
script/3.in
@@ -4,19 +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
|
|
||||||
|
|
||||||
# OpenRC compatibility
|
[ -x @RCDIR@/rc.shutdown ] && @RCDIR@/rc.shutdown
|
||||||
for script in /etc/local.d/*.stop; do
|
|
||||||
[ -x "$script" ] && "$script"
|
|
||||||
done
|
|
||||||
|
|
||||||
[ -x @SYSCONFDIR@/rc.shutdown ] && @SYSCONFDIR@/rc.shutdown
|
if [ -e @RUNDIR@/reboot ]; then
|
||||||
|
chmod 100 @RUNDIR@/reboot
|
||||||
|
fi
|
||||||
|
|
||||||
run_shutdown
|
run_shutdown
|
||||||
|
|
||||||
@@ -24,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."
|
||||||
|
@@ -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
|
||||||
|
@@ -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.
|
||||||
|
@@ -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.
|
||||||
|
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