Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
953c999ccf | |||
253e6b1c5e |
17
1
17
1
@@ -5,20 +5,15 @@ PATH=/usr/bin:/usr/sbin
|
|||||||
|
|
||||||
. /etc/runit/functions
|
. /etc/runit/functions
|
||||||
|
|
||||||
if [ -x /usr/bin/openrc ]; then
|
[ -r /etc/runit/rc.conf ] && . /etc/runit/rc.conf
|
||||||
msg "Welcome to Artix Linux!"
|
|
||||||
|
|
||||||
|
msg "Welcome to Artix Linux!"
|
||||||
|
|
||||||
|
if [ -x /usr/bin/openrc ] && [ "$SVMANAGER" = "openrc" ]; then
|
||||||
# Start core services: we'll use OpenRC for this.
|
# Start core services: we'll use OpenRC for this.
|
||||||
msg "Initializing services with OpenRC..."
|
msg "Initializing runlevel sysinit with OpenRC..."
|
||||||
|
openrc sysinit || msg_error "Failed to start sysinit runlevel"
|
||||||
for runlevel in sysinit boot default; do
|
|
||||||
openrc $runlevel || msg_error "Failed to start $runlevel runlevel"
|
|
||||||
done
|
|
||||||
else
|
else
|
||||||
msg "Welcome to Artix Linux!"
|
|
||||||
|
|
||||||
[ -r /etc/runit/rc.conf ] && . /etc/runit/rc.conf
|
|
||||||
|
|
||||||
# Start core services: one-time system tasks.
|
# Start core services: one-time system tasks.
|
||||||
detect_virt
|
detect_virt
|
||||||
for f in /etc/runit/core-services/*.sh; do
|
for f in /etc/runit/core-services/*.sh; do
|
||||||
|
7
2
7
2
@@ -13,6 +13,13 @@ done
|
|||||||
|
|
||||||
[ -x /etc/runit/rc.local ] && /etc/runit/rc.local
|
[ -x /etc/runit/rc.local ] && /etc/runit/rc.local
|
||||||
|
|
||||||
|
# The reason that boot is not in stage 1 is because if something hangs
|
||||||
|
# we can still listen for signals, however stage 1 does NOT accept signals
|
||||||
|
if [ -x /usr/bin/openrc ] && [ "$SVMANAGER" = "openrc" ]; then
|
||||||
|
openrc boot
|
||||||
|
openrc default
|
||||||
|
fi
|
||||||
|
|
||||||
runsvchdir "${runlevel}"
|
runsvchdir "${runlevel}"
|
||||||
mkdir -p /run/runit/runsvdir
|
mkdir -p /run/runit/runsvdir
|
||||||
ln -s /etc/runit/runsvdir/current /run/runit/service
|
ln -s /etc/runit/runsvdir/current /run/runit/service
|
||||||
|
20
Makefile
20
Makefile
@@ -6,14 +6,14 @@ all:
|
|||||||
$(CC) $(CFLAGS) pause.c -o pause $(LDFLAGS)
|
$(CC) $(CFLAGS) pause.c -o pause $(LDFLAGS)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
install -d ${DESTDIR}${PREFIX}/bin
|
install -d ${DESTDIR}${PREFIX}/lib/runit-artix/bin
|
||||||
install -m755 halt ${DESTDIR}${PREFIX}/bin/halt-runit
|
install -m755 halt ${DESTDIR}${PREFIX}/lib/runit-artix/bin/halt
|
||||||
install -m755 pause ${DESTDIR}${PREFIX}/bin/pause-runit
|
install -m755 pause ${DESTDIR}${PREFIX}/lib/runit-artix/bin/pause
|
||||||
install -m755 shutdown ${DESTDIR}${PREFIX}/bin/shutdown-runit
|
install -m755 shutdown ${DESTDIR}${PREFIX}/lib/runit-artix/bin/shutdown
|
||||||
install -m755 modules-load ${DESTDIR}${PREFIX}/bin/modules-load
|
install -m755 modules-load ${DESTDIR}${PREFIX}/lib/runit-artix/bin/modules-load
|
||||||
install -m755 zzz ${DESTDIR}${PREFIX}/bin/zzz-runit
|
install -m755 zzz ${DESTDIR}${PREFIX}/lib/runit-artix/bin/zzz
|
||||||
ln -sf halt-runit ${DESTDIR}${PREFIX}/bin/poweroff-runit
|
ln -sf halt ${DESTDIR}${PREFIX}/lib/runit-artix/bin/poweroff
|
||||||
ln -sf halt-runit ${DESTDIR}${PREFIX}/bin/reboot-runit
|
ln -sf halt ${DESTDIR}${PREFIX}/lib/runit-artix/bin/reboot
|
||||||
install -d ${DESTDIR}${PREFIX}/share/man/man1
|
install -d ${DESTDIR}${PREFIX}/share/man/man1
|
||||||
install -m644 pause.1 ${DESTDIR}${PREFIX}/share/man/man1
|
install -m644 pause.1 ${DESTDIR}${PREFIX}/share/man/man1
|
||||||
install -d ${DESTDIR}${PREFIX}/share/man/man8
|
install -d ${DESTDIR}${PREFIX}/share/man/man8
|
||||||
@@ -35,8 +35,8 @@ install:
|
|||||||
install -m755 rc.shutdown ${DESTDIR}/etc/runit
|
install -m755 rc.shutdown ${DESTDIR}/etc/runit
|
||||||
ln -sf /run/runit/reboot ${DESTDIR}/etc/runit/
|
ln -sf /run/runit/reboot ${DESTDIR}/etc/runit/
|
||||||
ln -sf /run/runit/stopit ${DESTDIR}/etc/runit/
|
ln -sf /run/runit/stopit ${DESTDIR}/etc/runit/
|
||||||
cp -aP runsvdir/* ${DESTDIR}/etc/runit/runsvdir/
|
cp -R --no-dereference --preserve=mode,links -v runsvdir/* ${DESTDIR}/etc/runit/runsvdir/
|
||||||
cp -aP services/* ${DESTDIR}/etc/runit/sv/
|
cp -R --no-dereference --preserve=mode,links -v services/* ${DESTDIR}/etc/runit/sv/
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm -f halt pause
|
-rm -f halt pause
|
||||||
|
@@ -19,3 +19,6 @@ if [ -n "$TIMEZONE" ]; then
|
|||||||
msg "Setting up timezone to '${TIMEZONE}'..."
|
msg "Setting up timezone to '${TIMEZONE}'..."
|
||||||
ln -sf "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
|
ln -sf "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
msg "Setting up sysusers.d entries..."
|
||||||
|
sysusers
|
||||||
|
3
rc.conf
3
rc.conf
@@ -1,5 +1,8 @@
|
|||||||
# /etc/runit/rc.conf - system configuration
|
# /etc/runit/rc.conf - system configuration
|
||||||
|
|
||||||
|
# Set the service manager (available options: "runit" or "openrc")
|
||||||
|
#SVMANAGER="runit"
|
||||||
|
|
||||||
# Set the host name.
|
# Set the host name.
|
||||||
#
|
#
|
||||||
# NOTE: it's preferred to declare the hostname in /etc/hostname instead:
|
# NOTE: it's preferred to declare the hostname in /etc/hostname instead:
|
||||||
|
Reference in New Issue
Block a user