Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
c2007499ce |
13
Makefile
13
Makefile
@@ -26,9 +26,7 @@ STAGES = \
|
|||||||
script/3 \
|
script/3 \
|
||||||
script/ctrlaltdel
|
script/ctrlaltdel
|
||||||
|
|
||||||
RCLOCAL = script/rc.local.start script/rc.shutdown.stop
|
RCLOCAL = script/rc.local script/rc.shutdown
|
||||||
|
|
||||||
UDEV = $(wildcard sv/udevd/*)
|
|
||||||
|
|
||||||
AGETTY_CONSOLE = $(wildcard sv/agetty-console/*)
|
AGETTY_CONSOLE = $(wildcard sv/agetty-console/*)
|
||||||
AGETTY_CONSOLE_S = supervise.agetty-console
|
AGETTY_CONSOLE_S = supervise.agetty-console
|
||||||
@@ -93,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
|
||||||
@@ -120,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)/local.d
|
install -d $(DESTDIR)$(RCDIR)
|
||||||
install -m755 $(RCLOCAL) $(DESTDIR)$(SYSCONFDIR)/local.d
|
install -m755 $(RCLOCAL) $(DESTDIR)$(RCDIR)
|
||||||
|
|
||||||
install -d $(DESTDIR)$(BINDIR)
|
install -d $(DESTDIR)$(BINDIR)
|
||||||
install -m755 $(BIN) $(DESTDIR)$(BINDIR)
|
install -m755 $(BIN) $(DESTDIR)$(BINDIR)
|
||||||
@@ -129,9 +126,6 @@ install-runit:
|
|||||||
install -d $(DESTDIR)$(TMPFILESDIR)
|
install -d $(DESTDIR)$(TMPFILESDIR)
|
||||||
install -m755 $(TMPFILES) $(DESTDIR)$(TMPFILESDIR)/runit.conf
|
install -m755 $(TMPFILES) $(DESTDIR)$(TMPFILESDIR)/runit.conf
|
||||||
|
|
||||||
install -d $(DESTDIR)$(SVDIR)/udevd
|
|
||||||
install -Dm755 $(UDEV) $(DESTDIR)$(SVDIR)/udevd
|
|
||||||
|
|
||||||
install -d $(DESTDIR)$(SVDIR)/agetty-console
|
install -d $(DESTDIR)$(SVDIR)/agetty-console
|
||||||
install -Dm755 $(AGETTY_CONSOLE) $(DESTDIR)$(SVDIR)/agetty-console
|
install -Dm755 $(AGETTY_CONSOLE) $(DESTDIR)$(SVDIR)/agetty-console
|
||||||
$(LN) $(RUNDIR)/$(AGETTY_CONSOLE_S) $(DESTDIR)$(SVDIR)/agetty-console/supervise
|
$(LN) $(RUNDIR)/$(AGETTY_CONSOLE_S) $(DESTDIR)$(SVDIR)/agetty-console/supervise
|
||||||
@@ -182,7 +176,6 @@ install-runit:
|
|||||||
install -Dm755 $(AGETTY_SULOGIN) $(DESTDIR)$(SVDIR)/sulogin
|
install -Dm755 $(AGETTY_SULOGIN) $(DESTDIR)$(SVDIR)/sulogin
|
||||||
$(LN) $(RUNDIR)/$(AGETTY_SULOGIN_S) $(DESTDIR)$(SVDIR)/sulogin/supervise
|
$(LN) $(RUNDIR)/$(AGETTY_SULOGIN_S) $(DESTDIR)$(SVDIR)/sulogin/supervise
|
||||||
|
|
||||||
$(LN) $(SVDIR)/udevd $(DESTDIR)$(RUNSVDIR)/default/udevd
|
|
||||||
for g in $(AGETTY_SYMS); do $(LN) $(SVDIR)/$$g $(DESTDIR)$(RUNSVDIR)/default/$$g; done
|
for g in $(AGETTY_SYMS); do $(LN) $(SVDIR)/$$g $(DESTDIR)$(RUNSVDIR)/default/$$g; done
|
||||||
for g in $(SULOGIN_SYM); do $(LN) $(SVDIR)/$$g $(DESTDIR)$(RUNSVDIR)/single/$$g; done
|
for g in $(SULOGIN_SYM); do $(LN) $(SVDIR)/$$g $(DESTDIR)$(RUNSVDIR)/single/$$g; done
|
||||||
|
|
||||||
|
@@ -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,11 +10,7 @@ for arg in $(cat /proc/cmdline); do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Hacky hacky OpenRC compatibility
|
[ -x @RCDIR@/rc.local ] && @RCDIR@/rc.local
|
||||||
for script in @SYSCONFDIR@/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,17 +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
|
|
||||||
|
|
||||||
# Hacky hacky OpenRC compatibility
|
[ -x @RCDIR@/rc.shutdown ] && @RCDIR@/rc.shutdown
|
||||||
for script in @SYSCONFDIR@/local.d/*.stop; do
|
|
||||||
[ -x "$script" ] && "$script"
|
if [ -e @RUNDIR@/reboot ]; then
|
||||||
done
|
chmod 100 @RUNDIR@/reboot
|
||||||
|
fi
|
||||||
|
|
||||||
run_shutdown
|
run_shutdown
|
||||||
|
|
||||||
@@ -22,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
|
||||||
|
4
script/rc.local.in
Normal file
4
script/rc.local.in
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# @RCDIR@/rc.local -- rc.local for Artix Linux
|
||||||
|
#
|
||||||
|
# Enter your custom commands here. It will be executed on stage 2
|
||||||
|
# before running services.
|
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ ! -x @SYSCONFDIR@/rc.local ]; then
|
|
||||||
cat > @SYSCONFDIR@/rc.local << EOF
|
|
||||||
# @SYSCONFDIR@/rc.local -- rc.local for Artix Linux
|
|
||||||
#
|
|
||||||
# Enter your custom commands here. It will be executed on stage 2
|
|
||||||
# before running services.
|
|
||||||
EOF
|
|
||||||
chmod +x @SYSCONFDIR@/rc.local
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Execute rc.local only once.
|
|
||||||
# If artix-branding-base exists, that one will execute rc.local instead.
|
|
||||||
[ ! -x @SYSCONFDIR@/local.d/local.start ] && . @SYSCONFDIR@/rc.local
|
|
4
script/rc.shutdown.in
Normal file
4
script/rc.shutdown.in
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# @RCDIR@/rc.shutdown -- rc.shutdown for Artix Linux
|
||||||
|
#
|
||||||
|
# Enter your custom commands here. It will be executed on stage 3
|
||||||
|
# after stopping services.
|
@@ -1,13 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ ! -x @SYSCONFDIR@/rc.shutdown ]; then
|
|
||||||
cat > @SYSCONFDIR@/rc.shutdown << EOF
|
|
||||||
# @SYSCONFDIR@/rc.shutdown -- rc.shutdown for Artix Linux
|
|
||||||
#
|
|
||||||
# Enter your custom commands here. It will be executed on stage 3
|
|
||||||
# after stopping services.
|
|
||||||
EOF
|
|
||||||
chmod +x @SYSCONFDIR@/rc.shutdown
|
|
||||||
fi
|
|
||||||
|
|
||||||
. @SYSCONFDIR@/rc.shutdown
|
|
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
|
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
udevadm control --exit
|
|
||||||
exec udevd
|
|
Reference in New Issue
Block a user