Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions srcpkgs/boot-66serv/files/66
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/execlineb -P
66-boot -b "Booting Voidlinux" -m
16 changes: 16 additions & 0 deletions srcpkgs/boot-66serv/files/runit
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[main]
@type = longrun
@version = @VERSION@
@description = "runit"
@user = (root)
@options = ( log )

[start]
@execute = ( /etc/runit/2 )

[stop]
@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )

[logger]
@backup = 3
@maxsize = 1000000
22 changes: 22 additions & 0 deletions srcpkgs/boot-66serv/files/switch-initutils
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This service automatically moves
# /usr/bin/{reboot,poweroff,halt,shutdown}
# so that if started with 66, users can shutdown etc. with it.
# It automatically moves everything back if started with
# runit again.
# This is run by runit and 66

if grep -q "init=/usr/bin/66" /proc/cmdline; then
for i in reboot poweroff halt shutdown; do
if ! test -e /usr/bin/${i}.runit; then
mv /usr/bin/${i} /usr/bin/${i}.runit
ln -s /etc/66/${i} /usr/bin/${i}
fi
done
else
for i in reboot poweroff halt shutdown; do
if test -e /usr/bin/${i}.runit; then
rm /usr/bin/${i}
mv /usr/bin/${i}.runit /usr/bin/${i}
fi
done
fi
12 changes: 12 additions & 0 deletions srcpkgs/boot-66serv/files/tty@
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[main]
@type = classic
@version = @VERSION@
@description = "Launch @I"
@user = ( root )
@options = ( env )

[start]
@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )

[environment]
cmd_args=!-J 38400
29 changes: 29 additions & 0 deletions srcpkgs/boot-66serv/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Template file for 'boot-66serv'
pkgname=boot-66serv
version=2.2.0
revision=1
wrksrc=${pkgname}-v${version}
build_style=gnu-configure
configure_args="--HOSTNAME=voidlinux --TTY=!4
--KEYMAP=!us --TZ=Europe/Madrid"
make_install_target="install install-man install-html"
hostmakedepends="lowdown"
makedepends="file"
depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
short_desc="Stage 1 boot for 66"
maintainer="teldra <teldra@rotce.de>"
license="ISC"
homepage="https://framagit.org/Obarun/boot-66serv"
conf_files="/etc/66/rc.local"
distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
checksum=69924a3c7f830a3a2b77506ec9264652eaa6ea4cdebb137547f7fb71444e3852

post_install() {
vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
vbin ${FILESDIR}/66
vlicense LICENSE
vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
vinstall ${FILESDIR}/runit 644 usr/share/66/service/
vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
}