Compare commits
6 Commits
20200803
...
20200905-3
Author | SHA1 | Date | |
---|---|---|---|
96a0aefa1d | |||
7aa0d2f443 | |||
bf99596e5e | |||
397b46ff3f | |||
ee63bf4a06 | |||
bcd456603b |
6
Makefile
6
Makefile
@@ -26,7 +26,7 @@ STAGES = \
|
||||
script/3 \
|
||||
script/ctrlaltdel
|
||||
|
||||
RCLOCAL = script/rc.local script/rc.shutdown
|
||||
RCLOCAL = script/rc.local.start script/rc.shutdown.stop
|
||||
|
||||
AGETTY_CONSOLE = $(wildcard sv/agetty-console/*)
|
||||
AGETTY_CONSOLE_S = supervise.agetty-console
|
||||
@@ -118,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)/local.d
|
||||
install -m755 $(RCLOCAL) $(DESTDIR)$(SYSCONFDIR)/local.d
|
||||
|
||||
install -d $(DESTDIR)$(BINDIR)
|
||||
install -m755 $(BIN) $(DESTDIR)$(BINDIR)
|
||||
|
12
script/2.in
12
script/2.in
@@ -10,13 +10,11 @@ for arg in $(cat /proc/cmdline); do
|
||||
fi
|
||||
done
|
||||
|
||||
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
|
||||
# Hacky hacky OpenRC compatibility
|
||||
for script in @SYSCONFDIR@/local.d/*.start; do
|
||||
[ -x "$script" ] && "$script"
|
||||
done
|
||||
|
||||
runsvchdir "${runlevel}"
|
||||
|
||||
ln -s @RUNSVDIR@/current @SERVICEDIR@
|
||||
|
11
script/3.in
11
script/3.in
@@ -11,13 +11,10 @@ stat_busy "Exit services ..."
|
||||
sv exit @RUNDIR@/service/*
|
||||
stat_done
|
||||
|
||||
if [ -x @RCDIR@/rc.shutdown ] && grep -qv '^#' @RCDIR@/rc.shutdown; then
|
||||
@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
|
||||
[ -x @SYSCONFDIR@/rc.local ] && @SYSCONFDIR@/rc.local
|
||||
# Hacky hacky OpenRC compatibility
|
||||
for script in @SYSCONFDIR@/local.d/*.stop; do
|
||||
[ -x "$script" ] && "$script"
|
||||
done
|
||||
|
||||
run_shutdown
|
||||
|
||||
|
@@ -1,4 +0,0 @@
|
||||
# @SYSCONFDIR@/rc.local -- rc.local for Artix Linux
|
||||
#
|
||||
# Enter your custom commands here. It will be executed on stage 2
|
||||
# before running services.
|
15
script/rc.local.start.in
Normal file
15
script/rc.local.start.in
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/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
|
@@ -1,4 +0,0 @@
|
||||
# @SYSCONFDIR@/rc.shutdown -- rc.shutdown for Artix Linux
|
||||
#
|
||||
# Enter your custom commands here. It will be executed on stage 3
|
||||
# after stopping services.
|
13
script/rc.shutdown.stop.in
Normal file
13
script/rc.shutdown.stop.in
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/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
|
Reference in New Issue
Block a user