Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
397b46ff3f | |||
ee63bf4a06 | |||
bcd456603b | |||
![]() |
c75de34303 | ||
![]() |
6453301c3b | ||
![]() |
454078d6a0 | ||
05801e2283 | |||
f84f50c4e9 |
3
Makefile
3
Makefile
@@ -118,8 +118,7 @@ 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)$(RCDIR)
|
install -d $(DESTDIR)$(SYSCONFDIR)
|
||||||
install -m755 $(RCLOCAL) $(DESTDIR)$(RCDIR)
|
|
||||||
install -m755 $(RCLOCAL) $(DESTDIR)$(SYSCONFDIR)
|
install -m755 $(RCLOCAL) $(DESTDIR)$(SYSCONFDIR)
|
||||||
|
|
||||||
install -d $(DESTDIR)$(BINDIR)
|
install -d $(DESTDIR)$(BINDIR)
|
||||||
|
@@ -6,6 +6,7 @@ PATH=/usr/bin:/usr/sbin
|
|||||||
|
|
||||||
run_sysinit
|
run_sysinit
|
||||||
|
|
||||||
install -m100 /dev/null @RUNDIR@/stopit
|
install -m000 /dev/null @RUNDIR@/stopit
|
||||||
|
install -m000 /dev/null @RUNDIR@/reboot
|
||||||
|
|
||||||
status "Initialization complete"
|
status "Initialization complete"
|
||||||
|
12
script/2.in
12
script/2.in
@@ -10,13 +10,13 @@ for arg in $(cat /proc/cmdline); do
|
|||||||
fi
|
fi
|
||||||
done
|
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
|
[ -x @SYSCONFDIR@/rc.local ] && @SYSCONFDIR@/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@
|
||||||
|
15
script/3.in
15
script/3.in
@@ -11,17 +11,12 @@ stat_busy "Exit services ..."
|
|||||||
sv exit @RUNDIR@/service/*
|
sv exit @RUNDIR@/service/*
|
||||||
stat_done
|
stat_done
|
||||||
|
|
||||||
if [ -x @RCDIR@/rc.shutdown ] && grep -qv '^#' @RCDIR@/rc.shutdown; then
|
# OpenRC compatibility
|
||||||
@RCDIR@/rc.shutdown
|
for script in /etc/local.d/*.stop; do
|
||||||
echo "==> @RCDIR@/rc.shutdown has been depreacted. Please move the contents"
|
[ -x "$script" ] && "$script"
|
||||||
echo " of the file to @SYSCONFDIR@/rc.shutdown since the next version of"
|
done
|
||||||
echo " runit-artix won't read @RCDIR@/rc.shutdown anymore."
|
|
||||||
fi
|
|
||||||
[ -x @SYSCONFDIR@/rc.local ] && @SYSCONFDIR@/rc.local
|
|
||||||
|
|
||||||
if [ -e @RUNDIR@/reboot ]; then
|
[ -x @SYSCONFDIR@/rc.shutdown ] && @SYSCONFDIR@/rc.shutdown
|
||||||
chmod 100 @RUNDIR@/reboot
|
|
||||||
fi
|
|
||||||
|
|
||||||
run_shutdown
|
run_shutdown
|
||||||
|
|
||||||
|
@@ -3,8 +3,11 @@
|
|||||||
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
|
||||||
touch @RUNDIR@/reboot
|
chmod 100 @RUNDIR@/reboot
|
||||||
|
|
||||||
# Proceed with shutdown process
|
# Proceed with shutdown process
|
||||||
echo "$MSG" | wall
|
echo "$MSG" | wall
|
||||||
|
Reference in New Issue
Block a user